Performance critical GUI application (windows,linux) Performance critical GUI application (windows,linux) linux linux

Performance critical GUI application (windows,linux)


First off, I would put some time into trying out a few VB.NET to C# converters. You're basically porting syntax, and there's no reason to do that by hand if you don't have to. Sure, you might have to clean up what comes out of the converter, but that's way better than a by-hand conversion.

Now, as for your questions:

1) does it make sense to do a GUI in winforms but the expensive stuff in native, unmanaged C/C++ ?

Not yet. Wait until you've done the conversion, and then find out where you're actually spending your time. There's no reason to jump into mixing C/C++ with C# until you find out that it's necessary. You may find that dropping into unsafe C# is sufficient. Even that may be unnecessary. You might just need to optimize algorithms. Find out what your bottlenecks are and then decide how to fix them.

2) any recommendations for a good cross platform windowing kit that would fit for the scenario described above?

I'd be looking into mono for sure. That's really the best you can do if you're going with C#. It's pretty much either mono or another rewrite in another language when/if you move to Linux.


1) Premature optimization is evil. Implement your "expensive stuff" in C# and see if you need to refactor it. Or, at least set up a test that will allow you to determine this.

2) Yowch. Cross platform UI. I wouldn't put up with the "may" stuff. Nail the weasels down; how can you possibly make design decisions without knowing what you're designing? If you go with a pure .NET implementation, will they complain if you have to (at a minimum) refactor it to work in Mono? If you create it in Java, will they be annoyed that it looks ugly as hell and users complain that they can't find their .exe file amongst all those .jars?


1) Not necessarily. I think it would be more correct to say that it's probably worthwhile writing your backend code in C++, regardless of the performance implications. Even though you can't tie your higher-ups down on the platform switch, it would be prudent of you to make preparations for that eventuality, since management types tend to change their mind alot without good reason (or warning); even if they decide not to switch now, that doesn't mean that they won't decide to switch six months from now. Writing your logic in C++ now, knowing that it's a possibility, though more difficult, may make your life significantly easier later.

2) Not really. There are "solutions" like wxWindows and GTK#, but often they're buggy, or difficult to get working properly, or they lack something important on one platform or another. They also usually lock you into a lowest-common-denominator UI (ie, general controls work fine but you can forget about ever doing something interesting -- WPF, for example -- with it). UIs are easy to write, so I think if you write your logic in something that's portable, it should be a trivial matter to knock together several platform-specific UIs.