当前位置:网站首页>[Software Architecture Mode] The difference between MVVM mode and MVC mode
[Software Architecture Mode] The difference between MVVM mode and MVC mode
2022-08-01 09:32:00 【Pig is not stupid】
First, MVVM mode:
1.MVVM composition
MVVM consists of three parts: Model, View and ViewMode:
- Model: The model.The data model, which is used to operate on the data.
- View: The view. Represents UI components, which are used to convert model data into UI for display.
- ViewModel: View-Model. Used to synchronize Model and View.
Under the MWVM architecture, there is no direct connection between the View and the Model, but through the ViewModel. The interaction between the Model and the ViewModel is bidirectional, so the changes of the View data will be synchronized to the Model, and the ModelChanges in data will also be immediately reflected on the View.
ViewModel connects the View layer and the Mode layer through two-way data binding, and the synchronization between View and Model is completely automatic without human intervention, so developers only need to focus on business logic and do not need manual operationsDOM does not need to pay attention to the synchronization of data state, and complex data state maintenance is completely managed by MVVM.
2.MVVC pattern diagram
Second, the MVC pattern
1.MVC composition
MVC consists of three parts: Model, View, and Controller:
- Model: The model.The data model, which is used to operate on the data.
- View: The view. Represents UI components, which are used to convert model data into UI for display.
- Controller: The controller. For business logic processing, the Controller obtains data through the Model, and after processing, renders the data through the View.
Note: MVC mode is less efficient than MVVM mode, because MVC mode lacks ViewModel and will not automatically synchronize, developers need to constantly interfere in the development process.
边栏推荐
- 消息队列面试题(2022最新整理)
- What are the common API security flaws?
- Static Pod, Pod Creation Process, Container Resource Limits
- Opencv creates a window - cv.namedWindow()
- PerViT: 神经网络也能像人类利用外围视觉一样观察图像!
- SkiaSharp's WPF self-painted five-ring bouncing ball (case version)
- 将aof文件转换为命令waoffle安装和使用
- ASP.NET Core 6 Framework Revealing Instance Demonstration [30]: Develop REST API with Routing
- Redis学习
- 【面试:并发篇39:多线程:线程池】ThreadPoolExecutor类-提交、停止
猜你喜欢
随机推荐
SkiaSharp 之 WPF 自绘 五环弹动球(案例版)
sql server, FULL mode, dbcc shrinkfile(2,1) can not shrink the transaction log, or the original size, why?
Redis学习
GBase 8c中怎么查询数据库配置参数,例如datestyle
毕业论文写作技巧
网络个各种协议
various network protocols
Microsoft Azure & NVIDIA IoT developers season I | Azure IoT & NVIDIA Jetson development foundation
Pod环境变量和initContainer
程序员如何学习开源项目,这篇文章告诉你
对于小应用来讲,使用哪款数据库比较好?
JVM 运行时数据区与JMM 内存模型详解
YOLOv7-Pose尝鲜,基于YOLOv7的关键点模型测评
leetcode 42. Catch the rain
Explain / Desc execution plan analysis
Graduation thesis writing skills
Three chess (C language implementation)
net stop/start mysql80 拒绝访问
报告:想学AI的学生数量已涨200%,老师都不够用了
【应用推荐】常见资源管理器整理,含个人使用体验和产品选型推荐








![[Beyond programming] When the fig leaf is lifted, when people begin to accept everything](/img/e1/ff8d416c99e1f370d73b9520654ddf.jpg)
