The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

MFC vs WTL

Which is the better pick?
coder
Thursday, March 06, 2008
 
 
WTL is cleaner
Bill
Thursday, March 06, 2008
 
 
My dilemma is that CodeProject has so many examples for MFC. Even if it is not as clean, it is hard to ignore such a good resource.

I also considered using C#, but all the "2.0 framework installation" issues keep me away. It is not portable either (Mono is a joke) and I am not afraid of C++.  :D
coder
Thursday, March 06, 2008
 
 
C++ is portable to a degree, but certainly not if it is dependant upon either of MFC or STL.
Specialist
Thursday, March 06, 2008
 
 
Microsoft is adding some 3rd party MFC controls to VC++ this year. They're for creating an Office 2007 style interface. How useful they are; I don't know.
You're not paranoid if ...
Thursday, March 06, 2008
 
 
"They're for creating an Office 2007 style interface."

Awesome! I've been waiting for the chance to confuse and piss off my users for no real benefit, the same way Microsoft did with O2007.
Greg Send private email
Thursday, March 06, 2008
 
 
> C++ is portable to a degree, but certainly not if it is
> dependant upon either of MFC or STL.

Very true. However, I totally gave up on the battle for portability as far as frameworks are concerned. I considered using wxWidgets at some point. It is definitely sufficient for a pet project, but for a commercial app, there aren't enough decent third-party components if you ever need them. What's there is bare minimums.

MS is the monopoly on the desktop anyway and it doesn't look like that will change any time soon.

I am not into Java... I am not interested in learning Delphi... That leaves C#/.NET and C++/MFC-WTL-ATL...

I also considered Adobe AIR, but it shines if you already have Flash code and know to code in ActionScript. If not, it is not a viable option in my opinion.

I am still debating whether I should ditch my hybrid-desktop app approach and go with a full-blown webapp or not.
coder
Thursday, March 06, 2008
 
 
I'd stick with MFC. There us way more support for it the WTL and way more controls, sample apps etc. available. As already mentioned codeproject.com is a fantastic resource.

That said try and minimize your use of MFC. For example use STL wherever you can, and not CString, CArray etc. Write every line of code with the idea it could run on other platforms.

I am also looking into writing more Desktop app code in Javascript and HTML, which makes it possible to reuse it on a Web app and also makes it portable to other platforms. You can happilly mix C++ and Javascript and MFC and HTML in a desktop app.
Neville Franks Send private email
Thursday, March 06, 2008
 
 
"Awesome! I've been waiting for the chance to confuse and piss off my users for no real benefit, the same way Microsoft did with O2007."

What an asinine remark. One of the problems developing MFC applications the past few years has been the circa 1998 interface typical to MFC applications. Having a more modern interface available from the Microsoft is big news for developers that use MFC. If you're not interested in the topic than just keep on walking. Remarks like the one you left merely show what a waste of space there is between your ears.
You're not paranoid if ...
Thursday, March 06, 2008
 
 
If you are interested in using the latest GUI widgets with MFC you don't have to wait for MS. See Prof-UIS at http://www.prof-uis.com
Neville Franks Send private email
Thursday, March 06, 2008
 
 
"What an asinine remark...Having a more modern interface available from the Microsoft is big news for developers that use MFC. If you're not interested in the topic than just keep on walking."

Apparently he is interested in the topic and he thinks that what you call a "modern interface" is crap. A sentiment that is shared by many, including myself.

It's really a good point, far from asinine: MFC isn't necessarily better than WTL just because it's getting Ribbon controls like Office 2007. It really depends on your opinion of the Ribbon et al.

So, what's the problem here? Don't get all jerky because someone disagrees with you. =D
Wayne Bloss Send private email
Thursday, March 06, 2008
 
 
I used to use MFC a lot, but lately finished a project with WTL.

WTL needs deeper understanding of C++ and Windows mechanism(at least the GUI part such as controls and message handling). But once you get it, you don't really want to go back to MFC, because you can write less bloated code and the app runs faster. One other advantage for WTL is the seamless integration of ATL and thus the Window Shell.

if you are writing system-related software and you are serious about Windows programming, WTL is definitely worth investing.

However, if your domain and interest are focused on OS-agnostic area. the UI is just a surface of your product or interest.

Using MFC might be quickier thanks to the Visual Studio IDE support.

Or you may consider QT.
tomgee
Thursday, March 06, 2008
 
 
QT is out of my price range. They don't even list the prices any more. Not to mention who knows what Nokia will do with it...
coder
Thursday, March 06, 2008
 
 
WTL is awesome but there is a severe lack of UI components for it. I've been writing a bunch of them myself over the last few years but it takes so much time to polish them to commercial quality... For example, I'm fighting with Win32 printing right now and I'm using the WTL classes for that, but there is no good reporting tool that I'm aware of so I have to resort to positioning lines on the page manually, calculating margins manually etc. I mean, this is 2008 FCS...

On a slightly related note, why aren't there any good ORM libraries for C++? Something like apache torque for Jave or propel or doctrine for PHP. Sometimes I really am starting to feel that C++ is legacy, as much as I hate to admit it.
joske vermeulen
Friday, March 07, 2008
 
 
> WTL is awesome but there is a severe lack of UI
> components for it.

This is what I am afraid of.
coder
Friday, March 07, 2008
 
 
WTL can host ActiveX compliant controls, so any ActiveX UI control will work in it.
Bill
Friday, March 07, 2008
 
 
C++ isnt a legacy language, its just low-level compared with python or ruby or java.

C++ has its place it you want fast native code.
n! labs Send private email
Friday, March 07, 2008
 
 
The difference between the two is MFC abuses the macro preprocessor where as WTL abuses C++ templates.

The first question you should ask is do you need a framework at all, you might be surprised how little value they add for many projects.
Tony Edgecombe Send private email
Sunday, March 09, 2008
 
 
> The first question you should ask is do you need a
> framework at all, you might be surprised how little
> value they add for many projects.

The amount of available components for MFC is overwhelming. I really don't want to reinvent the wheel.
coder
Monday, March 10, 2008
 
 
I don't see that much advantage in using WTL over MFC. Sure, the apps might be a little smaller and faster. But nothing to worry about. On the other hand, WTL has no industry support at all. MFC has it all. MFC has it all. It might be ugly, but it works.
fh
Monday, March 10, 2008
 
 
ooops
fh
Monday, March 10, 2008
 
 
MFC is also a lot harder to debug because you don't know what's going on in all those macros.

Although I'd agree with the established codebase and available libraries and online support of MFC over WTL. Just don't base your entire company's core codebase that might have to be maintained over a decade or more on it, because it can quickly show its monolithic sloth after just a few development iterations.
Bill
Monday, March 10, 2008
 
 
The lack of MVC and other frameworks is what put me off c#/.Net - All the (original) examples seemed to be little dialog based toys, it wasn't clear you even could write an MDI app with .Net.
Martin Send private email
Tuesday, March 11, 2008
 
 
MFC is the only framework I've ever seen where the main way you get better at it is by learning how to get around it.

WTL requires more intellectual horsepower at first. You need to understand Win32. You need to understand C++ pretty deeply.

It turns out that MFC requires those things too, but you don't realize it until you're knee deep in the project and have to go back and figure out how to cut out all the crap it put in your way.
Chris Tavares Send private email
Tuesday, March 11, 2008
 
 
"MFC is the only framework I've ever seen where the main way you get better at it is by learning how to get around it."

Brilliant summary !
Martin Send private email
Tuesday, March 11, 2008
 
 
I'll be using it just for the GUI and browser integration.
coder
Wednesday, March 12, 2008
 
 
I've never worked with either MFC or WTL but I'm interested in learning more.

Does WTL have the same DLL hell issues that MFC can sometimes have? I can't tell you how many times I've seen someone deliver something with MFC that blew up with some "MSVCRTxx.DLL" problem. I'm assuming this is because they chose not to include the runtime DLL's in the actual .exe file and are getting versioning issues.
uugh
Friday, March 14, 2008
 
 
There is no justification today to write a Windows GUI app in either. WinForms are much more flexible, have much more widgets, and C# as glue language is much easier to deal with (as Joel put it perfectly once, at least somebody cleans up the memory for you).

One exception is the case of a document/view style application (MS Visual Studio itself being a good example), which implies MFC.
Alex Cohn Send private email
Sunday, March 30, 2008
 
 
IMO, C# is the winner for the developer and B2B markets. For consumer markets, it is not for various reasons unless you don't mind using .NET 1.1.
coder
Monday, March 31, 2008
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz