Model, View and Controller in MVC3

The Model-View-Controller (MVC) pattern separates the modeling of the domain, the presentation, and the actions based on user input into three separate classes :

Model :
  1. Model is the representation of your data.
  2. It contains Business Logic.
  3. The model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller).

View :
  1. The view manages the display of information.
  2. No Code behind
  3. Action methods by default call views with the same name.
  4. Views are not tied to a specific action method or controller.
  5. Views should be dumb, should not contain any application logic. It only contains rendering logic.
  6. Views can be strongly typed.

 Controller :
  1.   The controller interprets the mouse and keyboard inputs from the user,  informing the model and/or the view to change as appropriate.
  2.   The Controller prepares the data with the help of model and informs View Engine to render which view.



Post a Comment