智能客户端Winform vs MVVM +棱镜
Windows Forms Simart Client 现在是旧事物了吗?它是否会被 Prism(和/或 MVVM)取代?我应该费心去了解智能客户端吗?
另一个可能相关的问题是,除了 wpf 中所有很酷的东西(如数据绑定和 3D)之外,Winforms 和 WPF 之间的性能差异是什么? WPF 在 Windows 2000 和 Pre2000 操作系统上运行是否困难?这个问题很重要,因为当您必须支持旧操作系统(例如在 NHS 中)时,它可以很大程度上决定您将使用 winforms 或 WPF 的平台?
Is Windows forms Simart Client is a legacy thing now? And is it to be replaced by Prism (and/or MVVM)? Should I bother to learn about Smart Client?
Another question which might be related to is that what are the performance differences between Winforms and WPF apart from all the cool stuff in wpf like data binding and 3D? Does WPF struggle to run on Windows 2000 and Pre2000 OS? This question is important because it can very much decide which platform you are going to use winforms or WPF when you have to support old OSs (for e.g. in NHS)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在使用过智能客户端软件工厂和 WPF + MVVM 后,我当然会认为 SCSF 是“遗产”。我不会在新项目中使用它。首先,它基于 WinForms,但也许更重要的是,它是一个臃肿的框架。它很麻烦并且不太适合单元测试。我发现,在用它开发应用程序 5 年的大部分时间后,该框架经常“妨碍”。
我无法与 Prism 交谈,但根据我使用 SCSF 的经验,我会回避任何开箱即用的框架。当我开始使用 WPF 和 MVVM 时,我编写了自己的“框架”部分。事实上,我发现我唯一需要的是一个好的 IoC 容器(StructureMap 是我的选择)和一个 EventAggregator(我自己编写的两个接口和一个类实现,直接借用了 Jeremy Miller 博客上的一篇文章)。除此之外,我直接使用 WPF 和 MVVM 开发模型。
给定一个全新的桌面应用程序,我的选择是 WPF、MVVM 和 WPF。结构图。
Having worked with both the Smart Client Software Factory and WPF + MVVM, I'd certainly consider SCSF "legacy". I wouldn't use it on a new project. First, it's based on WinForms, but maybe more importantly, it's a bloated framework. It's cumbersome and does not lend itself well to unit testing. I found, after developing an application with it for the better part of 5 years, that the framework just "got in the way" far too often.
I can't speak to Prism, but after my experience with SCSF I would shy away from any out-of-the-box frameworks. When I started working with WPF and MVVM I wrote my own "framework" bits. Really, the only things I found I needed were a good IoC container (StructureMap was my choice) and an EventAggregator (two interfaces and one class implementation that I wrote myself, borrowing directly from a post on Jeremy Miller's blog). Other than that, I go with straight WPF and the MVVM model of development.
Given a greenfield desktop application, my choice would be WPF, MVVM & STructureMap.
我认为您的第一个问题几乎可以归结为 WPF 与 Winforms,之前已经回答过。
但是,关于 Win2000 及更早版本上的 WPF 的第二个问题,WPF 是 .NET 3.0 的一部分,您至少需要 XP SP2 或 Win2003 Server for .NET 3.0,如此处,因此,如果您想在 XP 之前的环境中使用 .NET,则必须坚持使用WinForms。
I think your first question pretty much comes down to WPF versus Winforms, which have been answered before.
However, regarding your second question about WPF on Win2000 and earlier, WPF is a part of .NET 3.0 and you need at least XP SP2 or Win2003 Server for .NET 3.0 as can be seen here, so if you want to use .NET in a pre XP environment, you'll have to stick with WinForms.