MVP和MVC有什么区别? [英] What is the difference between MVP and MVC?

查看:69
本文介绍了MVP和MVC有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
什么是MVP和MVC,有什么区别?

Possible Duplicate:
What are MVP and MVC and what is the difference?

我没有看到MVP和MVC软件架构(控制器实现调解器模式的MVC)之间的任何区别,除了您调用调解器的名称(演示者与控制器)

I don't see any difference between MVP and MVC software architectures (MVC where controller implements mediator pattern), other than the name by which you call the mediator (presenter vs controller)

有人可以提供清晰的解释吗?

Can someone provide a clear explanation?

我很在乎,因为我对通过可可粉对MVC的理解很合理,我想知道如何才能理解MPF/C#/.NET

I care because I have a reasonable understanding of MVC via cocoa and I'm wondering how that knowledge will have to grow to understand MPF/C#/.NET

推荐答案

Darin提供了很好的链接.我想说有几个关键的区别,但是有很多相似之处. MVP的视图甚至比MVVC的视图更简单-它不了解模型.恕我直言,这使测试涵盖的所有内容变得更加容易.另外,例如,如果您同时需要GUI和CLI,则可以更轻松地提供备用视图.但是,请阅读本文,它涵盖了该主题.

Darin's provided a good link. I'd say there are a couple key differences, but a lot of similarity. MVP's view is even simpler than MVVC's - it doesn't know about the model. That makes it easier to get everything covered by tests, IMHO. Also, it makes it easier to provide alternate views, for example, if you want both a GUI and a CLI. But, read the article, it covers the topic well.

这篇关于MVP和MVC有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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