MVC design Pattern

Source: Internet
Author: User
Tags html form

MVC Architecture System Architecture:    users send requests in the interface, the system receives requests, processes them, and then renders the results with the user through the interface.      This process includes user actions, data transfer, Interface display (page echo), the familiar MVC pattern is to separate the three, reduce the coupling of the three.  view (receiving user input data to Controller)----"User requests"----->>> Console (receiving user requests, invoking models in response to user requests, and selecting view display response results)--"Business processing"-->> Model (representing application state, responding to status queries, processing orchestrations, notifying view business status updates)-----"Notification Data Update"-->>view (view   as shown:    MVC is a design pattern, Forcibly separates the application's input, processing, and output, dividing the application into three core modules: Model,view and console.  View:    View is the interface that the user sees and interacts with, the view displays the relevant data to the user, and can receive the user's input data, but it does not do any business processing;     View can query the model for business status. But you can't change the model;    View can also receive data update events emitted by the model, thus updating the user interface synchronously. The  Model:    model is the body part of the application, representing business data and business logic. A model can provide data for multiple views, and because the same model can be reused by more than one view, the reusability of the application is improved.  Console:    Controller receives the user's input and invokes the model and view to complete the user request, when the Web user clicks the Submit button in the page to send the HTML form, the controller receives the request and invokes the corresponding model component to process the request. The corresponding view is then called to display the data returned by the model.   MVC Process:    First the controller receives the user's request and decides which model should be called for processing;    Then the model handles the corresponding business logic according to the user request and returns the data;    Finally the controller invokes the corresponding view to format the data returned by the model and renders the result of the operation through the view. Specific implementations of   MVC:
    • Use the Springmvc class to encapsulate data elements that interact with the user (Model);
    • Use the action class to implement action processing and link steering. Implement the Controller function (Console) in MVC;
    • Use standard JSP Jstl tags and extjs2.0+ajax to complete data rendering (view), realize the view function in MVC;
    • Description: Spring MVC (ver2.5.6) has completely decoupled the front-end interface and the background Java application, simultaneously realizes the domain seamlessly docking in the front-end interface and the object attribute automatic mapping matching in the background controller control layer, greatly facilitates the development and the maintenance;

MVC design Pattern

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.