model-view-controller - MVC 模式中的 Controller 和 MVP 模式中的演示者有什么区别?

标签 model-view-controller design-patterns mvp

MVC 模式中的 Controller 和 MVP 模式中的演示者有什么区别?您能否提供链接以了解它们的优点和使用场景?

最佳答案

In MVP the Presenter assumes the functionality of the "middle-man" (played by the Application Controller in MVC). Additionally, the View is responsible for handling the UI events (like mouseDown, keyDown, etc), which used to be the Controller's job. Eventually, the Model becomes strictly a Domain Model.


Wikipedia .
这是一个 more detailed explanation on the differences between the two .
另见 Martin Fowler 的 Retirement note for Model View Presenter .

关于model-view-controller - MVC 模式中的 Controller 和 MVP 模式中的演示者有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4733700/

相关文章:

基于 Java Swing MVC 的贪吃蛇游戏。问题切换难度

iphone - 如何在 iPhone 应用程序中管理模型和 View ?

c++ - 库初始化和关闭的通用模式?

ios - 在 View Controller 之间传递数据

c++ - Qt:Qt 新手问题

android - Android UI 开发是否适合特定的设计模式?

java - 实时观察数百万个微小物体

ruby-on-rails - Rails Presenters 文件夹有什么用?

model-view-controller - 您将为Web应用程序选择哪种模式,为什么?

c# - 在 MVP Winforms App 中共享模型