Wednesday, 12 November 2014

Model View Controller



The Model View Controller is a software architecture which separates the representation of the information from the user’s interaction with it.  The architecture, as the name suggests, contains 3 main components. viz. The Model, The View and The Controller.

The Model
The model is the component that holds all the business logic. The model is responsible for manipulating the data, handling the database, structuring the data for the view, etc. In classic MVC, the model notifies the view about any change in data.
The View
The view is the presentation layer for the system. The view takes care of all the presentation related stuff.
The Controller
The controller basically sends commands to the model to update the models state. It also sends commands and data to the view to represent the data received by the Model.

ORM in MVC styled application
ORMs help you to store and retrieve full live objects from a relational database rather a set or rows. If you are using an ORM in your MVC styled application, the ORM will be responsible for generating your Models completely.

No comments:

Post a Comment