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)