windows VC++ MFC 在不久的将来会过时吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2598006/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Will VC++ MFC become obsolete in near future?
提问by AKN
Normally people say MFC is little clumsy. It makes UI development slightly difficult to maintain since it has lot of auto generated code. It has good architecture (doc/view) but is not transparent like Win32 programming to understand how window program works in the background. So with this situation, is it good to extend the exposure on MFC programming or better to switch to .NET since for faster UI design with ease in maintenance.
通常人们会说 MFC 有点笨拙。它使 UI 开发维护起来有些困难,因为它有很多自动生成的代码。它具有良好的体系结构(文档/视图),但不像 Win32 编程那样透明,以了解窗口程序在后台如何工作。因此,在这种情况下,是扩大对 MFC 编程的曝光还是更好地切换到 .NET,因为更快的 UI 设计和易于维护。
Is it good to continue as MFC developer or good to know .NET as well?
How globally companies are looking into MFC as a technology for UI developments. Are they comfortable in supporting their developers to continue with MFC or looking for changing their development technology.
全球公司如何将 MFC 视为 UI 开发技术。他们是否愿意支持他们的开发人员继续使用 MFC 或寻求改变他们的开发技术。
采纳答案by ereOn
I sincerely doubt that any company will start a new project using MFC instead of, at least, WinForms.
我真诚地怀疑任何公司会使用 MFC 而不是至少使用 WinForms 来启动一个新项目。
But I might just be too optimistic.
但我可能只是太乐观了。
On the other hand, having someone that can maintain old projects that use MFC is always a nice-to-have, but I wouldn't rely only on that skill.
另一方面,拥有可以维护使用 MFC 的旧项目的人总是一件好事,但我不会仅仅依赖于这项技能。
回答by dwo
Well, our product consists of about 70 MFC-projects (EXEs and DLLs), with some 100 man-years of development effort.
嗯,我们的产品由大约 70 个 MFC 项目(EXE 和 DLL)组成,其中包含大约 100 个人年的开发工作。
We have to ensure that this application will be running in at least 10 years from now. And we have to ensure that our existing customers can use their NT-networks and Win98 clients.
我们必须确保此应用程序将在至少 10 年后运行。而且我们必须确保我们现有的客户可以使用他们的 NT 网络和 Win98 客户端。
With that in mind we still begin new projects using MFC.
考虑到这一点,我们仍然使用 MFC 开始新项目。
Altough some optical stuff comes new with every Windows-version, the core of Windows is still pretty much the same and MFC will continue to work.
尽管每个 Windows 版本都有一些新的光学东西,但 Windows 的核心仍然几乎相同并且 MFC 将继续工作。
回答by Mr. Boy
MFC already falls into the category of legacy code for most cases. BUT, teams/companies who only know C++/MFC will continue to use it for new applications because it's quicker for them, and lets them re-use existing code-bases.
在大多数情况下,MFC 已经属于遗留代码的范畴。但是,只知道 C++/MFC 的团队/公司将继续将它用于新的应用程序,因为它对他们来说更快,并让他们重用现有的代码库。
So in conclusion, the proportion of MFC code which is legacy will continue to grow, but technologies normally take years or decades to die out, since the life-cycle of a team can be of this duration.
所以总而言之,遗留的 MFC 代码的比例将继续增长,但技术通常需要数年或数十年的时间才能消亡,因为团队的生命周期可能是这个持续时间。
If you are an MFC developer, finding a way to learn .NET is definitely a good idea because fewer and fewer jobs will want MFC, and those will generally be old projects rather than exciting new stuff.
如果您是 MFC 开发人员,找到一种学习 .NET 的方法绝对是一个好主意,因为越来越少的工作需要 MFC,而且这些通常是旧项目而不是令人兴奋的新东西。
But it's still a useful skill, knowing some rare technologies can get you good money!
不过还是很有用的技能,了解一些稀有的技术可以让你赚大钱!
回答by snowdude
Keep your C++ skills up to date. If I'm interviewing candidates for a job and one knows C++ and can demonstrate some deep C++ skills I knowthat they'll be able to handle anything I throw at them, whether that's VB, C#, Java, Python etc. It's just slightly different syntax and semantics. Multi-threaded programming is an additional layer on top of that that's really nice to have.
保持您的 C++ 技能与时俱进。如果我正在面试一份工作的候选人并且一个人知道 C++ 并且可以展示一些深入的 C++ 技能,我知道他们将能够处理我扔给他们的任何东西,无论是 VB、C#、Java、Python 等。它只是稍微不同的语法和语义。多线程编程是一个附加层,非常好。
回答by Jim In Texas
I have done a lot of MFC over the years and still like it a lot. It's the easiest and fastest way to generate a small dependency free windows executable. I usually mix in ATL, STL and boost classes with MFC, they all work together as a happy family. You do need to understand what the auto-generated codes does, but really its not that hard, especially if you've done pure win32 programs.
这些年来我做了很多 MFC 并且仍然非常喜欢它。这是生成小型无依赖 Windows 可执行文件的最简单和最快的方法。我通常将 ATL、STL 和 boost 类与 MFC 混合在一起,它们都像一个幸福的家庭一样一起工作。您确实需要了解自动生成的代码的作用,但实际上并没有那么难,尤其是如果您已经完成了纯 win32 程序。
Any MFC programmer should also learn .Net. It won't be hard because an MFC/Win32 developer will understand what all those classes in the .Net framework are actually doing.
任何 MFC 程序员也应该学习 .Net。这并不难,因为 MFC/Win32 开发人员将了解 .Net 框架中的所有这些类实际上在做什么。
As a career decision I would still encourage anyone to expand their skill set beyond just Windows desktop applications. For sure any consumer desktop application will want to be cross platform, as will many new business applications. If you want to stay with local computer applications you should consider learning a cross platform framework such as Qt.
作为职业决定,我仍然鼓励任何人扩展他们的技能,而不仅仅是 Windows 桌面应用程序。可以肯定的是,任何消费者桌面应用程序都希望跨平台,许多新的业务应用程序也是如此。如果你想继续使用本地计算机应用程序,你应该考虑学习一个跨平台的框架,比如 Qt。
Of course many apps are moving to the web, so it won't hurt a bit have some skills there also.
当然,许多应用程序正在转移到网络上,因此在那里也有一些技能不会受到任何伤害。