MVC Design Ideas

Source: Internet
Author: User




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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.