Complex software needs to have a clear architecture, code code. MVC is one of the most common software frameworks, and then it derives the MVP and MVVM.
One: MVC
M---> View: User interface
V---> Controllers (Controller): Business logic
C---> Model: Data Preservation
Simple communication mode
Interactive mode
More flexible mode (V-C-M-C-V)
The MVC pattern is essentially a structured pattern, and the structural pattern is actually forbidden and relatively fixed compared to the behavior pattern. MVC as a centralized controller
Two: MVP
MVP mode renamed Controller to presenter, while changing the direction of communication
1. The communication between the parts is bidirectional.
2.view is not associated with the model, and is passed through presenter.
3.view is very thin, does not deploy any business logic, presenter is very thick
Three: MVVM
The MVVM pattern renamed presenter to ViewModel, which is basically exactly the same as the MVP model.
The only difference is the two-way binding: The change of view is automatically reflected in the ViewModel, and vice versa. (Auto response vs can communicate)
Add
Frame mode: MVC,MVP,MVVM,MTV, etc.
FRAME: Angular,react,ssh,ssi, etc.
Design mode: Factory mode, policy mode, etc.
Reference from: http://www.ruanyifeng.com/blog/2015/02/mvcmvp_mvvm.html
Three frame modes