Wednesday, August 27, 2008

MVC Pattern

Model-View-Controller
The UIP Application Block is based on the model-view-controller (MVC) pattern. This is a fundamental design pattern for the separation of user interface logic from business logic. The pattern separates the modeling of the application domain, the presentation of the application, and the actions based on user input into three distinct objects:


Model — This object knows all about the data to be displayed and is responsible for managing the data and the actions of the application. It can be thought of as the processing part of an input-process-output system.

View — This object manages the information displayed to users. Multiple views can be used to display the same information in different ways. It can be thought of as the output part of an input-process-output system.

Controller — This object allows the user to interact with the application. It takes input from the user and passes instructions to the model. In the input-process-output system, this is the input part.

Goals of the UIP Application Block
The UIP Application Block is designed to help you:

  • Abstract all navigation and workflow code from the user interface
  • Enable the use of the same programming model for different types of application
  • Remove all state management from the user interface
  • Persist snapshot state across processes

No comments: