Advisable to use MFC? [closed]
I heard here a lot that MFC is outdated, and wraps Win32 in bad OOP.
But Microsoft released MFC 10 with VS2010, and it has latest tools like ribbon interface, so should one use it for simple apps?
MFC is widely considered to be poorly designed but it has been updated recently and appears to be alive and well. You may decide not to use it for other reasons, but you should not reject it for being outdated.
MFC doesn't look bad if you understand it. Otherwise you consider it as poorly designed.
MFC is not outdated: a lot of complex applications use MFC, for example MS Office. And you even can find in samples how to make office-look application.
Also for simple apps you can use ATL.
I have seen MFC applications are noticeably faster, particularly they load faster compared to C#. The compelling arguments I have heard from C# guys are it is very fast to development in compared to MFC. In terms of performance MFC wins hands down.
You can make a call on what kind of application you are developing and what features do you need. The trend unfortunately is moving away from MFC though I personally can't justify it. I know couple of companies who are planning to migrate MFC applications to .NET My friends there old me mainly it's the faster development time and it is easy to develop in.
If you are bold you can still start new application with MFC and do better than those who would with C#. If you just want to go with trend than use new easier tools and take a little hit with performance.
Overall I would definitely not sideline MFC as it might be the only fit for certain high performance applications. For example I love the GUI threads in MFC which don't exist in C++ but are very powerful if used properly. I don't know if they exist in C# or newer languages but I wouldn't like to give up on them.
精彩评论