可用的Visual Studio 2008 c ++项目平台的优点和缺点?

时间:2022-09-01 19:11:37

If choosing between:

如果选择:

  • ATL
  • Windows Forms
  • MFC
  • Win32

Specifically the application will be:

具体来说,申请将是:

  • for completely in-house use.
  • 完全在内部使用。

  • Most users lack basic windows/pc knowledge. (consider simple UI)
  • 大多数用户缺乏基本的Windows / PC知识。 (考虑简单的UI)

  • used for automated testing which entails:
    -bringing in lots of data from external equipment (can choose VXI, USB, or Ethernet)
    -very heavy on graphics - likely directX
  • 用于自动化测试需要: - 从外部设备中获取大量数据(可以选择VXI,USB或以太网) - 图形非常繁重 - 可能是directX

  • Lifespan of the application will be 10+ years (consider future windows platforms, etc.)
  • 应用程序的寿命将超过10年(考虑未来的Windows平台等)

  • Users will be in very remote locations and offline while testing, but can be online each night to sync reports (separate application used for database syncing now) - consider program update challenges?
  • 用户将在测试时处于非常偏远的位置并离线,但每晚可以在线同步报告(现在用于数据库同步的单独应用程序) - 考虑程序更新挑战?

  • Program speed adds value - meaning the faster we can aquire and display data, the more testing can be done. There is no bottleneck other than the program, simply every bit faster = every bit more productive.
  • 程序速度增加了价值 - 意味着我们可以更快地获取和显示数据,可以进行更多的测试。除了程序之外没有任何瓶颈,只是更快一点=每一点都更有效率。

Again, c++ specifically - not C#.

同样,c ++特别是 - 而不是C#。

Thanks, Jeff

4 个解决方案

#1


If you don't mind tying yourself to VC++, I would go for ATL+WTL. It is very lightweight and still adds some abstraction to raw Win32. MFC is OK as well, I guess, although I don't really like it, but it is better documented than WTL.

如果你不介意将自己与VC ++联系起来,我会选择ATL + WTL。它非常轻量级,仍然为原始Win32添加了一些抽象。 MFC也可以,我想,虽然我不是很喜欢它,但它比WTL更好。

As for Windows Forms, i would stay away from it, especially if you know you are going to use C++.

至于Windows Forms,我会远离它,特别是如果你知道你将使用C ++。

#2


Stay clear of MFC. Granted, it's used a lot, but it's a great example of non-idiomatic C++ use. Notably, it implements its own RTTI system and reimplements parts of STL.

远离MFC。当然,它使用了很多,但它是非惯用C ++使用的一个很好的例子。值得注意的是,它实现了自己的RTTI系统并重新实现了STL的各个部分。

ATL is not very feature-rich, but there is a good extension called WTL. It's not exactly great C++ either, but much better than MFC. If you're not interested in GTK, Qt and the like (presumably because you'd like the framework to be thin so as to permit easy integration with DirectX etc.), WTL is probably the best option for you.

ATL功能不是很丰富,但有一个很好的扩展称为WTL。它也不是很好的C ++,但比MFC好多了。如果你对GTK,Qt等不感兴趣(可能是因为你希望框架很薄,以便与DirectX轻松集成等),WTL可能是你的最佳选择。

#3


I don't think C++ Windows Forms is a valid combination. At least it's not in my installation of VS 2008.

我不认为C ++ Windows Forms是一个有效的组合。至少它不在我的VS 2008安装中。

So that leaves us with ATL, MFC and Win32. All are old, but Win32 is the oldest, so I would eliminate that.

这样我们就可以使用ATL,MFC和Win32。所有都是旧的,但Win32是最古老的,所以我会消除它。

There is a lot of external support for MFC (CodeProject.com, etc.), its fairly well documented and there's lots of people out there with MFC experience. Look at the number of topics on this website for ATL vs. MFC. MFC has an order of magnitude more posts.

有很多外部支持MFC(CodeProject.com等),它有相当好的文档记录,并且有很多人有MFC经验。查看本网站上ATL与MFC的主题数量。 MFC的帖子数量增加了一个数量级。

MFC seems to be much more common than ATL. IMO, MFC would be the way to go (given the limited choices).

MFC似乎比ATL更常见。 IMO,MFC将是最佳选择(鉴于选择有限)。

#4


I have extensive experience with both WTL and MFC and wouldn't choose WTL over MFC anymore. MFC isn't so bad, once you learn which parts to ignore (doc/view, CArchive, containers, ...) MFC gives you a much wider selection of UI controls that will never be matched by WTL, and there is much more help available for MFC. With WTL, you're pretty much on your own (apart from the WTL mailing list and sample code on viksoe.dk).

我对WTL和MFC都有丰富的经验,不再选择WTL而不是MFC。 MFC并不是那么糟糕,一旦你知道要忽略哪些部分(doc / view,CArchive,容器......)MFC为你提供了更广泛的UI控件选择,它们永远不会被WTL匹配,而且还有更多帮助MFC。使用WTL,您可以自己动手(除了WTL邮件列表和viksoe.dk上的示例代码)。

That being said, if you'll be doing the heavy lifting in DirectX anyway, the UI toolkit won't matter that much. Both MFC and WTL will do for a few forms and dialogs; win32 is too much work without added value over MFC or WTL, and Windows Forms from C++ is a pita, and slow. Plus Windows Forms is oldschool already, at least MFC won't change much anymore :)

话虽这么说,如果你无论如何都会在DirectX中做大事,那么UI工具包就不会那么重要了。 MFC和WTL都可以用于几种形式和对话; win32是太多的工作,没有超过MFC或WTL的附加值,而C ++中的Windows Forms是一个皮塔饼,而且很慢。加上Windows Forms已经是oldschool,至少MFC不会再有太大变化了:)

#1


If you don't mind tying yourself to VC++, I would go for ATL+WTL. It is very lightweight and still adds some abstraction to raw Win32. MFC is OK as well, I guess, although I don't really like it, but it is better documented than WTL.

如果你不介意将自己与VC ++联系起来,我会选择ATL + WTL。它非常轻量级,仍然为原始Win32添加了一些抽象。 MFC也可以,我想,虽然我不是很喜欢它,但它比WTL更好。

As for Windows Forms, i would stay away from it, especially if you know you are going to use C++.

至于Windows Forms,我会远离它,特别是如果你知道你将使用C ++。

#2


Stay clear of MFC. Granted, it's used a lot, but it's a great example of non-idiomatic C++ use. Notably, it implements its own RTTI system and reimplements parts of STL.

远离MFC。当然,它使用了很多,但它是非惯用C ++使用的一个很好的例子。值得注意的是,它实现了自己的RTTI系统并重新实现了STL的各个部分。

ATL is not very feature-rich, but there is a good extension called WTL. It's not exactly great C++ either, but much better than MFC. If you're not interested in GTK, Qt and the like (presumably because you'd like the framework to be thin so as to permit easy integration with DirectX etc.), WTL is probably the best option for you.

ATL功能不是很丰富,但有一个很好的扩展称为WTL。它也不是很好的C ++,但比MFC好多了。如果你对GTK,Qt等不感兴趣(可能是因为你希望框架很薄,以便与DirectX轻松集成等),WTL可能是你的最佳选择。

#3


I don't think C++ Windows Forms is a valid combination. At least it's not in my installation of VS 2008.

我不认为C ++ Windows Forms是一个有效的组合。至少它不在我的VS 2008安装中。

So that leaves us with ATL, MFC and Win32. All are old, but Win32 is the oldest, so I would eliminate that.

这样我们就可以使用ATL,MFC和Win32。所有都是旧的,但Win32是最古老的,所以我会消除它。

There is a lot of external support for MFC (CodeProject.com, etc.), its fairly well documented and there's lots of people out there with MFC experience. Look at the number of topics on this website for ATL vs. MFC. MFC has an order of magnitude more posts.

有很多外部支持MFC(CodeProject.com等),它有相当好的文档记录,并且有很多人有MFC经验。查看本网站上ATL与MFC的主题数量。 MFC的帖子数量增加了一个数量级。

MFC seems to be much more common than ATL. IMO, MFC would be the way to go (given the limited choices).

MFC似乎比ATL更常见。 IMO,MFC将是最佳选择(鉴于选择有限)。

#4


I have extensive experience with both WTL and MFC and wouldn't choose WTL over MFC anymore. MFC isn't so bad, once you learn which parts to ignore (doc/view, CArchive, containers, ...) MFC gives you a much wider selection of UI controls that will never be matched by WTL, and there is much more help available for MFC. With WTL, you're pretty much on your own (apart from the WTL mailing list and sample code on viksoe.dk).

我对WTL和MFC都有丰富的经验,不再选择WTL而不是MFC。 MFC并不是那么糟糕,一旦你知道要忽略哪些部分(doc / view,CArchive,容器......)MFC为你提供了更广泛的UI控件选择,它们永远不会被WTL匹配,而且还有更多帮助MFC。使用WTL,您可以自己动手(除了WTL邮件列表和viksoe.dk上的示例代码)。

That being said, if you'll be doing the heavy lifting in DirectX anyway, the UI toolkit won't matter that much. Both MFC and WTL will do for a few forms and dialogs; win32 is too much work without added value over MFC or WTL, and Windows Forms from C++ is a pita, and slow. Plus Windows Forms is oldschool already, at least MFC won't change much anymore :)

话虽这么说,如果你无论如何都会在DirectX中做大事,那么UI工具包就不会那么重要了。 MFC和WTL都可以用于几种形式和对话; win32是太多的工作,没有超过MFC或WTL的附加值,而C ++中的Windows Forms是一个皮塔饼,而且很慢。加上Windows Forms已经是oldschool,至少MFC不会再有太大变化了:)