11 Days of MVC MVC Framework (i)

Source: Internet
Author: User

1 Traditional MVC pattern :

Model is the encapsulation of application state and business functions, and understands it as a domain model that contains both data and behavior. Model accepts the controller request and completes the corresponding business logic, which can be notified to the view when the application state changes

View: Implements the rendering of the interface and captures the user's interactive actions

The view capture to user action is forwarded directly to the controller, which completes the UI logic. If you need to design a call to the business logic, the controller calls the model directly. After the UI finishes processing, the controller will control the original view or create a new view to complete the response to user interaction.

Whether the model notifies the view when the application state changes or the view captures the user's action notification controller, the message flows in a one-way fashion, so it is recommended to use the observer pattern to implement them through registration/subscription. The observer with view as the model registers the corresponding event to handle the user interaction by registering the appropriate event to detect the change in the state.

2.MVP mode:

MVP is a widely used UI architecture pattern for event-driven frameworks such as ASP. NET Web Forms and Windows Forms.

11 Days of MVC MVC Framework (i)

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.