My colleagues are using Visual Studio 2002 and uses the C++ MFC. I am developing in C #.
It has not been any problems before, but now questioning our customers if we really should develop in different environments. My colleagues think (of course) that I should move to C++ MFC. I think that they can use .NET instead of MFC.
Is there any point to learn the MFC? It feels a bit outmoded, or am I wrong? What are the arguments against and for .NET compared with MFC?
Edit:
We are developing process systems and assistance applications for the nuclear industry. The main application is an emulator that emulates an old computer system and uses C++/MFC. It is very time critical, maybe the core should it still be in native C++. But the GUI to the emulator and all surrounding applications are not particularly critical.
And is there any real reason that you should replace the existing MFC application?
MFC and .NET are at nearly opposite extremes, each thoroughly crappy in its own way.
Using MFC is roughly on the order of living in the decaying wreck of a WW II surplus building. There aren't any signs to warn about dangerous areas, and it's probably not immediately apparent where to find running water, electricity, or a toilet that works -- even though all of them are there, if you know how to find them. Like any decaying building, there are plenty of holes in the walls and such, so you can leave anytime you want for as long as you want. Likewise, dragging in things from the outside world is pretty easy, though it's pretty much up to you to do the "dragging" to get it there.
Using .NET is like living on the set of The Truman Show. It fits one person's idea of what real life should be like. Within its boundaries, life can seem Utopian. In the end, however, it's little more than a pleasantly accoutered prison cell, and none of what it portrays as life is quite real. All your interaction with the outside world is subject to the whim of a director whose aims are mostly to improve his own ratings; your welfare is considered only to the extent that it affects him.
Unlike most prisons, .NET does have a well marked escape route (labeled "P/Invoke"). Like the escape route from any good prison, however, it's a mile-long sewage pipe. Most residents are aware of its existence, but nearly the only who go there are teenagers proving their manliness. The few who put it to real use do so only in dire necessity. Those of us who found it necessary once too often have realized it's better to just stay outside and not go back in.
Edit: Since some people want circles and arrows and a paragraph on the back of each one to be used as evidence in court: MFC's strength and weakness is that it's mostly a fairly thin wrapper around the API. That's a weakness because there are a fair number of holes in its coverage, and because it does relatively little to "smooth over" the places that the API itself doesn't fit together particularly well. For example, if something is implemented using COM, that will usually show up directly in your code that uses it. It's a strength, because it's fairly easy to extend MFC to handle areas it doesn't by default, as well as to simply bypass it and work directly with the API when you need to do so. It's also been updated relatively infrequently, so while it can currently produce reasonably "modern" looking applications, that hasn't always been the case. Given its history, it would be hard to predict that it'll continue to be the case.
.NET's strength and weakness is that it's a much "thicker" wrapper around the API. It does considerably more to "smooth over" differences in the API, so (for example) parts that are implemented in COM don't look/act noticeably different from parts that are implemented as straight C function calls. From inside .NET, the differences disappear. .NET is (currently) Microsoft's favored technology, so it's updated much more regularly, and does a much better job of ensuring that your UI follows the latest guidelines. My guess is that it's much more likely than MFC to continue doing so for some time.
The weakness of .NET is that it's much more difficult to bypass or extend. Basically, your only route to the outside world is through P/Invoke. Even for small excursions, it's ugly and painful. Trying to use it very often or for anything approaching a major extension is an exercise in masochism.
If (nearly) everything you write can fit within what .NET supports, it's the clear choice. It's much cleaner and smoother as long as you stay inside its boundaries.
If you write code that fairly frequently needs to go outside the bounds supported by the framework, MFC will probably work much better for you. With .NET, the .NET model applies to your whole program. With MFC, it's relatively easy to write programs that use MFC for their UI, and do things however they want for anything else that MFC doesn't support.
There are a lot of pros/cons in this choice. MFC is the old stand by, it's been around for ages and does show its age. On the other hand it's still fairly well supported and MS keeps updating it to stay current.
The .Net framework has better support as it has a larger team backing it and is seen as something to build new parts of Windows on.
On the other hand, MFC is a big part of the Windows Ecosystem. If you're programing on the platform it will be worth it to have at least a working knowledge of what MFC does and how so when you end up supporting an MFC app (and don't worry, some day you will) you'll have a good grounding on where to start.
I think there's value in knowing C++ since the language will be around a long time. You never know when programming in C++ may be required, and in today's job market, having more languages under your belt only enhances your resume.
As for MFC, I'm trying my best to pull away from it. It is old by computing standards (approaching 20 years, I think), but Microsoft still sees the value in supporting it with new releases and feature packs. From that standpoint, I doubt MFC will go away anytime soon. But that doesn't mean I want to program with it. The fluidity and ease with which one can program in C# beats the pants off MFC/C++ every day of the week. Threading, sockets, string manipulation, etc. - all of these things are simply easier to do in C# than in C++. Plus, C#/.NET is the primary technology focus for Microsoft, and I'd rather be on that edge than the MFC backburner when it comes to career development.
One nice feature that MFC provides is the Document/View framework (single document or multiple documents) which didn't have the equivalence in .NET yet. This feature can be quite useful and handy when you need to create application that works like Microsoft's Word. It helps separate the data model from the view you want to represent to users. I think most people will jump to the .NET side for good once this feature has been implemented. ( Is Microsoft working on this or at least has plans to work on this?)