Java MVC design pattern

Source: Internet
Author: User

There is a very important concept in programming, that is, the concept of reuse. reuse is not only the reuse of code, but also the reuse of ideas. Specifically, there are three important concepts in Java regarding reuse: design patterns, frameworks, and architectures. The Framework refers to code reuse. The design mode refers to the reuse of design ideas. The architecture is a combination of code and design ideas.

In most cases, the MVC pattern is used for Web pages. That is to say, in most cases, this pattern is used for javaweb, but it is still a good design pattern in Java programming, therefore, we will not only focus on web pages, but also explain their design ideas in an abstract way.

MVC refers to the model interface controller, M refers to the business logic model, V refers to the interface view, and C refers to the Controller controller. The event causes the Controller to change the model or view, or both. If the view is changed, the view will retrieve data from the potential model and refresh itself. If the model is changed, all dependent views are changed by themselves. (It can be seen that the business logic includes all the functions, that is, the business. congtroller coordinates the correspondence between the interface and the business. View depends on the data and attributes of the model. Its core is the correspondence between the controller control view and the model)

It only elaborates on the key points of thinking rather than in-depth analysis, because the key of MVC lies in thinking, and mastering the key points of thinking will make the memory concise and easy to remember.

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.