MVC Introduction

ASP.NET MVC Introduction (Beta)

MVC stands for Model-View-Controller. ASP.NET MVC is an open-source framework that provides web development. It is an architectural pattern that separates an application into three major parts: model, view and controller. It's lightweight and it has many advantages over traditional web forms.

ASP.NET MVC is not replacing Web Forms, it is an alternate option of ASP.NET Web Forms for developing web applications. You have both option to develop the web application in .net framework. It's very good for handling complex application. Due to the separation of model, view and controller, a large development team's developer can work on parallel on the same module in the application. For example, someone can work in the view, someone can work on the controller and someone can work on the model parallelly.

Model - Models are the part of the application that responsible for data logic i.e. data access from the database or any other source. Model use to represent the application data on view. Its sends user inputs from view to controller. It also provides validation logics. It always communicates between controller and view.

View - Views are the parts of the application that responsible for representing UI. Typically, it is created from model data. The user always accesses only the view.

Controller - Controllers are the parts of the application that interact with user means handling user request and response, communicate with model and rendering the UI. Controller only handles all the requests.

Advantage of ASP.NET MVC

1. In ASP.NET MVC, application managing is easy due to separation of model, view and controller.

2. ASP.NET MVC is not supporting view state and server-based controls, So you have full control over application behaviours.

3. Its provides better test driven development (TDD). This is the greatest advantage of the mvc architecture.

4. It's light weight framework.

5. It's highly extensible, pluggable and customizable.

6. Supports existing features of ASP.NET

7. More supporting in terms of SEO.

Difference Between ASP.NET and ASP.NET MVC

By default, its enforcing to follow an architecture pattern No, default pattern provided
Not supporting view state and server controls View state and server controls are supported
It easy to test It hard to test
Provides dependency injection Not provided dependency injection
Rapid application development is not possible Rapid application development is possible
It is open source It is not open source