MVC Pattern

From Suhrid.net Wiki
Revision as of 23:25, 8 June 2013 by Suhridk (talk | contribs)
Jump to navigationJump to search

Intro

  • The basic principle behind MVC is that the business logic is not only separate from the presentation, the business logic is not even aware of the presentation.

Model

  • The model holds all data, state and application logic. The model is oblivious to the view and controller, although it provides an interface to manipulate and retrieve its state and can send notifications of state changes to observers.

View

  • Gives a representation of the model. The view usually gets the state and data it needs to display directly from the model.

Controller

  • Takes the input from the user and figures out what it means to the model.