Reference
- https://www.zhihu.com/question/20148405/answer/107071448
- Http://www.cnblogs.com/indream/p/3602348.html
- Https://www.liaoxuefeng.com/wiki/001434446689867b27157e896e74d51a89c25cc8b43bdb3000/ 001434501628911140e1cb6ce7d42e5af81480f7ecd5802000 (MVC)
- Https://www.liaoxuefeng.com/wiki/001434446689867b27157e896e74d51a89c25cc8b43bdb3000/ 001475449022563a6591e6373324d1abd93e0e3fa04397f000 (MVVM)
MVC Model-Views (view)-Controller
- Model-used to encapsulate data related to business logic and how to handle the data.
- View-Show data
- Controller-Process business logic and control processes.
Mvpmvvmmodel-view-viewmodel
Self-understanding
In MVVM, once the model is updated, it is immediately reflected in the view. Once the view is updated, it is immediately reflected in the model. This is a two-way binding. For example, in teacher Liao's example, when updating a JS object (Model), the view is updated immediately. There is no need to manipulate the DOM (in MVC, the behavior of manipulating the DOM is the controller's process of handling the business). In MVC, the data is changed in the model, view cannot be updated immediately, because the controller controls this data update to throw to view, so this is one-way.
Software architecture, WEB-MVC,MVP,MVVM