Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Performance critical GUI application (windows,linux)

I've been tasked with updating a series of applications which are performance critical VB.NET apps that essentially just monitor and return networking statistics. I've only got three requirements: convert it to C#, make it fast, and make it stable

One caveat is that we "may" migrate from a .NET platform to linux "soon"

I will be responsible for maintaining these apps in the future so I'd like to do this right. I have decided to refactor these apps according to the MVP pattern so that I can properly unit test the hell out of this bad boy. But I was also thinking since I was using MVP that I could also do the computationally expensive stuff in native C/C++ code while the GUI would be done with .NET forms, or Qt or whatever.

questions:

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

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

like image 716
eviljack Avatar asked Aug 13 '08 14:08

eviljack


1 Answers

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.

like image 166
Derek Park Avatar answered Oct 18 '22 19:10

Derek Park