Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

八、谈谈你对MVC、MVP和MVVM的理解? #8

Open
liwen327 opened this issue Feb 2, 2020 · 0 comments
Open

八、谈谈你对MVC、MVP和MVVM的理解? #8

liwen327 opened this issue Feb 2, 2020 · 0 comments

Comments

@liwen327
Copy link
Owner

liwen327 commented Feb 2, 2020

这三者都是为了解决view和model的耦合问题。
1、MVC主要应用在后端,如Spring MVC ASP.NET MVC等,在前端的早期应用中也有Backbone.js框架,优点是分层清晰,缺点是数据流混乱,带来不好维护的问题。
2、MVP模式是MVC的进化形式,Presenter作为中间层负责MV通信,解决了两者耦合问题,但Presenter过于复杂导致难于维护。
3、MVVM模式在 前端有广泛应用。它不仅能解决MV耦合问题,还同时解决了维护两者映射关系的大量繁杂代码和DOM操作代码,在提高开发效率,可读性的同时还有不错的性能体验。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant