Mvc Architecture

Last modified on by DigitalIndiaInfo Team.



MVC Architecture

Previous Section you have seen overview of MVC, Here you will learn about MVC architecture.

Now understand the MVC architecture which supported by ASP.NET.

The Model-View-Controller (MVC) is an architectural pattern. MVC stands for Model, View, and Controller. MVC divided an application into three components - Model, View, and Controller.

Model: it manages the data, logic and rules of the application.It receives user input from the controller. Model represents data logic.Model objects store data retrieved from the database. class in C# is make to describe a model.

Model represents the user input .

View: View is a user interface or frontend design user screen. View display model-controller data to the user side and also enables them to modify them. View in MVC is comination of HTML, CSS, and Razor syntax,javascript that makes it easy and fast to communicate with the model and the controller.

View is the User Front page

Controller: The controller receives the user input ,The controller is the decision maker and the glue between the model and view. the user uses the view and raises an HTTP request, which will be managed by the controller. The controller work on the request and after that returns the response to view.

Controller is the request manager .

The following figure show the Architechture design between Model, View, and Controller.

MVC Architecture

The following figure show the interaction between Model, View, and Controller.

Request Flow in MVC Architecture

As per the given above figure, model view controller relation show. when a user enters a URL in the browser, it goes to the webserver and routed to a controller. A controller executes related view and models for that request and create the response and sends it back to the browser.