MVC 和 MVP 监督控制器是一样的吗?

发布于 2024-12-10 17:16:05 字数 713 浏览 0 评论 0原文

可能的重复:
什么是 MVP 和 MVC,有什么区别?< /a>

我在网站上阅读了以下关于 MVC 的描述:

在 MVC 的情况下,控制器只需构建模型并传递 它关闭到视图进行渲染。之间没有状态交互 视图和控制器,只是“嘿,这是模型,稍后见” 从控制器到视图。

我已阅读以下有关 MVP - 监督控制者的内容

监督控制器:演示者处理用户手势。景观 通过数据绑定直接绑定到模型。在这种情况下是 演示者的工作是将模型传递给视图,以便它可以 绑定到它。 Presenter 还将包含手势逻辑,例如 按按钮、导航等。

从上面的描述来看,我觉得 MVC 和 MVP 背后的底层逻辑 - 监督控制器是相同的。

我的理解正确吗?

提前致谢

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

I have read the following description for the MVC in a website:

In this case of MVC the Controller simply builds the Model and passes
it off to the View for rendering. No stateful interplay between the
View and Controller, just a “hey, here’s the Model, see you later”
from the Controller to the View.

I have read the following about the MVP - Supervising controller

Supervising Controller: The Presenter handles user gestures. The View
binds to the Model directly through data binding. In this case it's
the Presenter's job to pass off the Model to the View so that it can
bind to it. The Presenter will also contain logic for gestures like
pressing a button, navigation, etc.

From the description above i feel like the underlying logic behind MVC and MVP - supervising controller are same.

Is my understanding correct?

Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夜雨飘雪 2024-12-17 17:16:05

Stackoverflow 上已经有一篇很棒的文章解决了这个问题 MVP 和 MVC 是什么,有什么区别?

There is a great post already on Stackoverflow addressing this question in What are MVP and MVC and what is the difference?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文