什么是模型视图演示者? [英] What is Model View Presenter?

查看:141
本文介绍了什么是模型视图演示者?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以以尽可能简单的方式解释模型查看演示者模式是什么?与模型视图控制器有什么区别?哪个是最好的或为什么目的?

解决方案

Martin Fowler有一个UI设计模式页面,他定义然后谈话关于MVC,MVP等模式。



http: //martinfowler.com/eaaDev/uiArchs.html



为了总结差异,MVC中的控制器可以更好地控制UI,并处理事件,而MVP中的主持人更为被动,只是通过UI呈现信息。



一般来说没有太大的区别,而且它们之间的界限往往是模糊的。 / p>

Can someone please explain in a way as simple as possible what the Model View Presenter pattern is? What is the difference with Model View Controller ? Which is best or for which purpose ?

解决方案

Martin Fowler has a page on UI design patterns, in which he defines and then talks about MVC, MVP and other patterns.

http://martinfowler.com/eaaDev/uiArchs.html

To summarise the differences, Controllers in the MVC have more control over the UI, and handle events, while a presenter in the MVP is more passive, and just presents information through the UI.

In general there's not much difference, and often the line between them is blurry.

这篇关于什么是模型视图演示者?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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