MVC模式中的控制器与MVP模式中的演示者有什么区别? [英] What is the difference between controller in MVC pattern and presenter in MVP pattern?
问题描述
在MVP中,演示者承担中间人的功能(由应用程序控制器在MVC中)。此外,View负责处理以前是Controller的工作的UI事件(如mouseDown,keyDown等)。最终,该模型严格地是域模型。
说维基百科。
这是一个更详细的解释两者之间的差异。
另见Martin Fowler的模型视图演示者退休说明。
What is the difference between controller in MVC pattern and presenter in MVP pattern? Can you provide links for understanding the Merits and usage scenario for both of them?
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.
Says Wikipedia.
Here is a more detailed explanation on the differences between the two.
See also Martin Fowler's Retirement note for Model View Presenter.
这篇关于MVC模式中的控制器与MVP模式中的演示者有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!