演示设计模式 [英] Presentation Design Patterns

查看:74
本文介绍了演示设计模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一段时间以来,我一直在研究和使用演示设计模式,并且已经成功实现了诸如 FrontController MVP 的设计模式。 code>等用于 WebApps ,当然还有 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.

推荐答案

所有演示模式均源自MVC。但是,ASP.NET MVC为我们提供Model2,在Passive View(PV)和Supervising Controller(SC)中提供了MVP,而MVVM为我们提供了Presentation Model。

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.

对于Web


  • Model 2

  • MVP(PV和SC)

对于Windows窗体

For the Windows Forms


  • MVP PV和SC)

对于WPF


  • MVP(PV和SC)

  • MVVM

有一个非常不错的数字摘自《 Microsoft .NET:为企业设计应用程序》一书,其中介绍了MVC,MVP,MVVM以及可以在Windows Forms,Web Forms,ASP.NET MVC中使用的内容。

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.

图7-14位于第374页,但是您也可以观看这里

The figure 7-14 is on page 374, however you can also watch it here.

这篇关于演示设计模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆