k-World

Basics of MVC

M V C – Model View Controller

Its an presentational design pattern which implements the separation of concern concept, means all the UI (User Interface) layer, Business layer and Database layers are separated/decoupled . Which helps to maintain the code clean and tidy.

Model provides the real world data object. Which provides the data to the View from the data/entity/domain object.

View represent the HTML which needs to be rendered in the web browsers. View renders just the data obtained from the controller.

Controller is the core of MVC. Which takes care of the data which needs to be sent to the view and in turn is re-directed to view which will be rendered in the HTML.

General flow of MVC, when a user requests the data. The request will first hit the controller(action method), the controller will in-turn speaks to the Model and after processing the data. The processed data is sent to the View from the Controller. Finally view will be rendered accordingly.

Different Versions of MVC in asp.net till date:MVC 1 » MVC 2 » MVC 3 » MVC 4….

Comments on: "Basics of MVC" (2)

  1. […] Basics of MVC (kirangondi.wordpress.com) […]

  2. […] Basics of MVC (kirangondi.wordpress.com) […]

Leave a comment