模型视图控制器有哪些选择? [英] What Alternatives Are There to Model-View-Controller?

查看:93
本文介绍了模型视图控制器有哪些选择?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在大学学习和跟随SO的发展过程中,我听到了很多有关Model-View-Controller架构设计模式的信息.我什至在不了解MVC模式之前就无意中使用了MVC模式,并且仍然在我的日常工作中使用它.从我所看到的来看,它可能是当今使用的最受欢迎的模式.不过,我还不太了解的是可以使用替代MVC的替代模式.有哪些选项,您出于什么原因决定通过MVC使用它们?我也想知道它们通常用于的系统类型.最后,使用它们的利弊是什么?

While going through university and from following the development of SO, I've heard a lot about the Model-View-Controller architectural design pattern. I inadvertently used the MVC pattern even before I knew what it was, and still use it in my everyday job. From what I've seen, it's probably the most popular pattern used today. What I haven't heard much about though, are the alternative patterns you can use instead of MVC. What options are there, and for what reasons would you decide to use them over MVC? I'm also interested in knowing the types of systems they are typical of being used for. Finally, what are the pros and cons that come along with using them?

推荐答案

  1. 被动视图- http://martinfowler.com/eaaDev/PassiveScreen.html
  2. 监督控制器- http://martinfowler.com/eaaDev/SupervisingPresenter.html
  3. Model-View-Presenter- http://martinfowler.com/eaaDev/ModelViewPresenter.html
  1. Passive View - http://martinfowler.com/eaaDev/PassiveScreen.html
  2. Supervising Controller - http://martinfowler.com/eaaDev/SupervisingPresenter.html
  3. Model-View-Presenter - http://martinfowler.com/eaaDev/ModelViewPresenter.html

我个人最喜欢的是 Passive View .比包括MVC在内的其他产品更具可测试性.

My personal favorite is the Passive View. More testable than others I've seen including MVC.

这篇关于模型视图控制器有哪些选择?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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