Difference between revisions of "MVC Pattern"
From Suhrid.net Wiki
Jump to navigationJump to search (Created page with "= 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 r...") |
|||
Line 1: | Line 1: | ||
+ | = 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 = | = Model = | ||
Revision as of 23:25, 8 June 2013
Contents
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.