[Tools Programming] MFC vs .NET

Started by
9 comments, last by Bearhugger 12 years, 3 months ago
Wow and to think I thought most C++ programmers abandoned MFC a long time ago. Please scorch the Earth of this plague.

Personally for internal tools I just use Win32 calls directly - at this point I have a basic C++ library that handles wrapping Win32 w/o that horrible nightmare MFC.

We also sometimes use wxWindows for our graphical tools since some of the art people use OSX and it's really easy to port them using it.
Advertisement
MFC isn't nearly as bad as some make it to be. It has an ugly learning curve with all the macros and App wizard stuff, but once it has been tamed, it gets the job done. I wouldn't build a full-featured app with that anymore, but it still has some advantages. For example, since it's mostly wrapper classes with a set of classes for a simple MVC framework, it's lightweight, so for something that you don't want to take too much of the system's resources (such as building a blank rendering window for a game) it's a much better choice then some massive framework like Qt or Java swing. Though nothing beats coding the (even uglier) Win32 API when it comes to being light, heh.

But yeah, Windows Forms is ALOT better then MFC. This is what brings me the highest productivity, and with C++/CLI it's easy to glue your game engine written in native code into .NET, and then enjoy the convenience of the .NET library, LINQ, etc. It has a lot of documentation and tutorials as well. I think that would be my choice.

WPF is nice, but I wouldn't recommend it for a game editor, because I doubt you need its power if you already have your rendering engine coded and ready to import as a DLL. Also, it has an absurd learning curve; at my company, we've spent literally days trying to figure how to figure stuff that should have been really simple. Still, it's annoying to use unless you're an expert, but the results are really impressive. (Once again, if you need the power.) The documentation sucks for it so far.

Qt... well it's advertised as a GUI toolkit but it has evolved into an entire framework, which is good if you need a full-featured integrated library, but it also uselessly bloats the library (and then makes it heavier on the system then it needs), with stuff that often are already provided by the standard library or boost. (Without necessarily being better.) The signal/slot mechanism to handle events also has you write in non-standard C++, which is something I'm not a fan of. It's cross-platform though, which is great if somehow Java isn't an option. And unlike MFC it's easy to learn.

Cocoa/ObjC is an horror but you probably don't care about Mac OSX if you were using MFC so I won't review that one, and I don't have enough experience with wxWidgets or GTK to comment them as well.

This topic is closed to new replies.

Advertisement