MVC is not a design pattern, but a design idea
Design pattern: is a fixed method. Inflexible, with specific usage scenarios
Design idea: is a kind of thought, more flexible, have multiple design pattern combination realization.
MVC Design Ideas:
V (view): Main function display data, as long as there is data, do not care about the source of the data
M (model): The main function of providing data (mainly used to provide data is not concerned about the data to whom to display).
C (Controller): main function: Coordinate V and M. As a bridge (intermediary) between V and M. (Controller is responsible for giving m data and then controlling which view to display)
Model class: The class that stores the data is called the Model class. (Addressperson, Photoinfo)
Model Layer class: As long as the data related to the class is the model layer of the class (Data storage class, processing class, data request class, data parsing Class)
The task of mvc:m layer is to share Controller data processing function, let C value to deal with M and V communication, do not do data processing, and Addressbookhelper is to help addressbooklistcontroller thin body, Data modules that share data.
For this helper class, for data processing, only the assistant is available, so the class uses a singleton design pattern.
MVC Design Ideas