当前位置:网站首页>Understanding of MVVM and MVC

Understanding of MVVM and MVC

2022-07-01 11:31:00 Front end Xiaozhen

know mvc and mvvm Construction

mvc

​    1、model layer   It mainly deals with the addition, deletion, modification and query of the database

       2、view View layer   Mainly html  css  js   At the interactive level

​    3、controller It mainly deals with the logic part

mvvm

1、 User is re  view View layer   Sponsored http agreement  

2、 Then again controller The first step of receiving

3、 Again model Add, delete, modify and check the data in the layer

4、 Again from model The reverse return in the layer controller

5、controller Judge the addition, deletion, modification and query of the database

6、 Then render to view Rendering in the view layer

reflection : What's the matter with interfaces

![mvvm](../day01/image/mvvm.png)

1、html  css   in other words view It's us template Something in it   That is what we call labels

2、viewmodel   That is, let's deal with dom And the logic in the data source

3、model   That is, the data in our interface

reflection :   that mvc and mvvm The overall design pattern and architecture are basically similar   So what is the correlation point  ? What is the interface
 

原网站

版权声明
本文为[Front end Xiaozhen]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/182/202207011126398151.html