当前位置:网站首页>Analysis on the similarities and differences of MVC, MVP and mvvc
Analysis on the similarities and differences of MVC, MVP and mvvc
2022-06-13 04:42:00 【Dax1_】
MVC
- Model (Model): Save the data
- View (View): The user interface .
- controller (Controller): Business logic
communication mode :
Communication process :
- User pass UI Interface interaction trigger View Respond to ,View Send instructions to Controller
- Controller After completing the business logic , requirement Model Update data
- Model Send new data to View, requirement View to update , Users get feedback after the update
Typical frame :react
Be careful :MVC All communications are one-way
MVP
MVP Mode will MVC Of Controller Renamed Presenter
communication mode :
Be careful :
- The communication between each part is two-way Of
- View and Model No contact , All pass Presenter Pass on
- View Very thin , Don't deploy any business logic , be called " Passive view "(Passive View), That is, there is no initiative , and Presenter Very thick , All the logic is deployed there .
MVVM
MVVM Mode will Presenter Renamed as ViewModel( Model view ), Basically with MVP The pattern is exactly the same .
communication mode
The only difference is ,View and ViewModel Between Two way binding
Communication process :
- View Receive user interaction requests
- View Forward the request to ViewModel
- ViewModel operation Model Data update
- Model Update the data , notice ViewModel Data changes
- ViewModel to update View data
Typical frame :Vue、Angular
With Vue For example
- model: Corresponding data Data in
- v: Templates 、UI Interface
- VM:Vue Instance object
MVVM And MVC The biggest difference is MVVM Medium ViewModel The view is automatically updated
Reference documents
MVC,MVP and MVVM Icon - Ruan Yifeng's Weblog (ruanyifeng.com)
边栏推荐
- Nodejs parsing get request URL string
- Small program imitating Taobao Jiugong grid sliding effect
- C # get all callable methods of WebService interface [webmethod]
- Collection of wrong questions in soft test -- morning questions in the first half of 2010
- Develop go using vscode
- [chapter 67 of the flutter problem series] the solution to the problem that the get plug-in cannot jump to the route twice in the dialog pop-up window in flutter
- Ladder race
- Third party comment plugin
- Implementation of homepage header function in PHP development blog system
- Idea Download
猜你喜欢
小程序基础入门(黑马学习笔记)
Win8.1和Win10各自的优势
Li Kou brush question 647 Palindrome substring
Express framework knowledge - Art template template, cookie, session
2022 ICML | Pocket2Mol: Efficient Molecular Sampling Based on 3D Protein Pockets
Analyse du principe de mise en œuvre d'un éditeur de texte open source markdown - to - rich
Ctfshow SQL injection (211-230)
[flutter problem Series Chapter 67] the Solution to the problem of Routing cannot be jumped again in in dialog popup Using get plug - in in flutter
Sword finger offer 56 - I. number of occurrences in the array
Conception d'un système basé sur MVC avec javaswing JDBC
随机推荐
PHP development 16 exit module
Record a troubleshooting process - video call cannot be picked up
2022 question bank and answers for operation certificate examination of safety production management personnel in road transport enterprises
Catalan number
力扣刷题647.回文子串
Powershell 加域 Add-Computer模块
Tita绩效宝:远程一对一面谈的问题
php开发14 友情链接模块的编写
E - Lucky Numbers
Online audio adjustment technology summary
[untitled]
Webpack system learning (VIII) how contenthash can prevent browsers from using cache files
General communication protocol for industrial Internet
Introduction to applet Basics (dark horse learning notes)
2022 ICLR | CONTRASTIVE LEARNING OF IMAGE- AND STRUCTURE BASED REPRESENTATIONS IN DRUG DISCOVERY
【Flutter 问题系列第 67 篇】在 Flutter 中使用 Get 插件在 Dialog 弹窗中不能二次跳转路由问题的解决方案
Ultra quicksort reverse sequence pair
Test question bank and online simulation test for special operation certificate of construction scaffolder (special type of construction work) in 2022
JS, how to add grid style
Converting MySQL data to PostgreSQL with Navicat