Thursday, November 13, 2008

Model-View-Controller (MVC)

The Model-View-Controller (MVC) Patterns improve reusability of business logic by separating the three components required to generate and manage a specific user interface (such as a single Web page).

Model - contains the data

View (the Web page) - will display and allow the user to manipulate
Controller - links the Model and the View, and manages all interaction and processing of the data in the Model

Execution Events:

1. User interaction with the View raises events in the Controller

2. The Model then raises events to update the View

However, this introduces a dependency between the Model and the View. To avoid this, the MVP pattern uses a Presenter that both updates the Model and receives update events from it, using these updates to update the View.

No comments:

Post a Comment