Preface description
In the actual combat project and study to summarize the Android Terminal Project framework
Includes MVC, MVP, MVVM, primarily for mobile Android
Directory
1. Framework Basics
2. Transverse frame model
3. Vertical structure Process
4. Code examples
1. Framework Basics
MVC Architecture
Basic notes:
1.model model, responsible for handling specific business logic
2.view view, responsible for displaying results, generally interacting directly with users
3.controller Controller, responsible for forwarding the view interface request to model processing and returning the results sequentially
Work Flow:
1. User operation in the view interface
2.view interface sends request to controller, controller notifies model processing request
After 3.model processing, the result is returned to the controller, and the controller returns the result to the view interface
4. The view interface is displayed to the user according to the results.
Special Note:
The resulting information for model is required to be returned to the view layer for processing
Communication Description:
View communication Controller,controller communication model; unidirectional communication
View can call controller, controller cannot call view, only return data
A comparison of MVC, MVP, and MVVM patterns