演示设计模式
我已经研究和使用演示设计模式一段时间了,并且我已经成功地为 WebApps
FrontController、MVP
等设计模式>,当然还有 MVC
模式和 ASP.NET MVC
框架,这是一个不错的选择。但是,我想知道使用像 MVP 这样的表示模式对于 WinForms 应用程序是否是一个不错的选择。如果答案是肯定的,那就太好了,如果不是和/或存在需要注意的陷阱,如果您能解释一下有关 WinForms
应用程序中不同表示模式的想法,那就太好了。
I've been studying and working with presentation design patterns for a while, and i have successfully impleneted design patterns like FrontController
, MVP
etc. for WebApps
, and of course the MVC
pattern and the ASP.NET MVC
framework which is a great choice. however, i was wondering if using a presentation pattern like MVP
would be a good choice for WinForms
applications. if the answer is yes then great, if not and/or there are pitfalls to be aware of it would be great if you could explain the ideas a little bit about different presentation patterns in WinForms
applications.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
所有表示模式都源自 MVC。然而,Model2 是 ASP.NET MVC 给我们的,MVP 分为被动视图 (PV) 和监督控制器 (SC),而表示模型 (Presentation Model) 是 MVVM 给我们的。
对于 Web,
对于 Windows Forms
对于 WPF
《Microsoft .NET:架构》一书中有一个非常好的图企业应用程序”介绍了 MVC、MVP、MVVM 以及适用于 Windows 窗体、Web 窗体、ASP.NET MVC 的内容。
图 7-14 位于第 374 页,不过您也可以此处观看。
All presentation patterns derive from MVC. However, Model2 is what ASP.NET MVC gives us, MVP is devided in Passive View (PV) and Supervising Controller (SC) and Presentation Model is what the MVVM give us.
For the Web,
For the Windows Forms
For the WPF
There is a very nice figure from the book "Microsoft .NET: Architecting Applications for the Enterprise" which presents MVC, MVP, MVVM and what can be fit in Windows Forms, Web Forms, ASP.NET MVC.
The figure 7-14 is on page 374, however you can also watch it here.
您可能需要查看以下文章 其中描述了与表示组件和模型相关的一些流行的和新的设计模式。
You may want to look the following article where few popular and new design patterns that are related to presentation component and model are described.