Hello Friends, In this tutorial, I am going to give you a brief introduction to ASP.NET MVC. ASP.NET MVC is an architectural pattern, not a design pattern that is most popular nowadays.
After completing this article you will be able to understand:
- What is ASP.NET MVC?
- What is Model, View, Controller in ASP.NET MVC?
- Features of ASP.NET MVC.
MVC stands for Model View Controller is a famous architectural pattern nowadays. MVC uses Separation of Concern (SOP) that divides our application into three logical components called Model, View and Controller. That means you don’t need to deal with the pages, Controls, and Complex ASP.NET Page Life Cycle as in ASP.NET Web Form.
ASP.NET MVC divides your application into three component called Model, View and Controller.
Model is a set of class libraries. It contains the Business Layer with specific domain functionality or the data that is being transferred between the View and Controller. For example, Employee object can retrieve the employee information from the database, manipulate the data and transferred back to the database. So Model is used to maintain a state of data between View and Controller.
A view is a component to which the user interacts. A view is responsible for displaying the data related to application returned from the controller.
Controller act as a junction between Model and View. It is responsible for processing business logic for the application. It is used to process business logic for the application. It processes all the incoming requests, manipulates the data using Model and renders the final output to the View.
Features of ASP.NET MVC.
- It is good platform for creating complex but lightweight application because it does not use View State, PostBack
- It provides separation of concern(SOA) that means it divides our application into three component Model, View, Controller. This Separation of Concern makes the application easy to manage.
- It provides a Test Driven Development enviorement.
- It provides a good supports for URL based Routeing.
- It provides support for all existing features like Master Pages, Security, Authorization and Authentication.
Hope you understand the concept of Model-View-Controller in ASP.NET MVC and what is the role of each while developing an ASP.NET MVC application.