gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 19:29:04 27 4
gpt4 key购买 nike

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/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com