Introduction to MVC Patterns

Source: Internet
Author: User

MVC is an ideal way to construct a software or component from 3 different parts:

1. Model: The object used to store the data.

2. View: The object that provides the data display for the model.

Controller: Responsible for the specific business logic operation, that is, the controller according to the requirements of the view of the data processing, and the results stored in the

Model, it is also the responsibility to have the model and view interact as necessary to let the view update display when the data in the model changes.

The MVC pattern in JSP:

Model: One or more JavaBean objects for storing data, JavaBean primarily provides a simple setxxx () method and GetXXX () method,

In these methods, the specifics of the processing of the data are not involved.

Views: One or more JSP pages that provide data display for the model, and JSP pages primarily use HTML tags and javabean tags to display data.

Controller: One or more servlet objects that perform data processing according to the requirements submitted by the view, and store the results in JavaBean.

The servlet then uses the Redirect method to request a JSP page in the view to update the display.

Introduction to MVC Patterns

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.