Model View Design Patterns

The first ever documented pattern was MVC (Model View Controller). Two more recent Model View patterns are MVP (Model View Presenter) and MVVM (Model View ViewModel).

Here we review these important patterns and their use in modern JavaScript development.





  Model View Patterns
   Introduction Introduction to Model View Patterns.
   MVC Model View Controller. Separates an application in three logical components: Model, View, and Controller. The Model represents the domain specific business data, usually coming from a database. The View is the user interface with which the user interacts. The Controller receives events from the View and responds by updating the data in the Model, which, in turn, notifies the View of the data changes.
   MVP Model View Presenter. A modification of MVC. The Controller is named Presenter as it takes a more active role in updating the View. In MVP the Model and View do not communicate directly with each other; all communication goes via the Presenter.
   MVVM Model View ViewModel. A further refinement of MVP with the addition of data binding. The Presenter is named ViewModel gets the data from the Model and presents it to the View. Data binding is used to synchronize data changes between the View and the ViewModel. The ViewModel updates the Model as needed.
   MV Frameworks An overview of Model View JavaScript Frameworks.