Blog

Home / Pages / Blog

What is MVC?

MVC stands for Model, View, and Controller. MVC separates an application into three components - Model, View, and Controller.

MVC Architecture

Model: Model represents the shape of the data and business logic. It maintains the data of the application. Model objects retrieve and store model state in a database.

View: View is a user interface. View display data using a model to the user and also enables them to modify the data.

Controller: The controller handles the user request. Typically, a user interacts with View, which in-turn raises an appropriate URL request, this request will be handled by a controller. The controller renders the appropriate view with the model data as a response.

As per the above figure, when the user enters a URL in the browser, it goes to the server and calls an appropriate controller. Then, the Controller uses the appropriate View and Model and creates the response and sends it back to the user.