ASP.NET MVC
It’s a part of ASP.NET and provides an alternative to ASP.NET webforms. You can even mix webforms and MVC. Basic concepts like state management are still the same. Thus, if you have some knowledge of Webforms then you can reuse it while learning ASP.NET MVC.
The MVC (Model-View-Controller) design pattern has been around for a few decades, and it's been used across many different technologies. Everything from Smalltalk to C++ to Java, and now C Sharp and .NET use this design pattern to build a user interface.
Following are some salient features of the MVC pattern:−
* Originally it was named Thing-Model-View-Editor in 1979, and then it was later simplified to Model- View-Controller.
* It is a powerful and elegant means of separating concerns within an application (for example, separating data access logic from display logic) and applies itself extremely well to web applications.
* It increases the testability of your application parts.
History
Microsoft has released various versions till date, right from ASP.NET MVC 1.0.
ASP.NET MVC 5.2 is the latest release and 6.0 is in beta.
In April 2009, the ASP.NET MVC source code was released under the Microsoft Public License (MS-PL). "ASP.NET MVC framework is a lightweight, highly testable presentation framework that is integrated with the existing ASP.NET features.
Some of these integrated features are master pages and membership-based authentication. The MVC framework is defined in the System.Web.Mvc assembly.
In March 2012, Microsoft had released part of its web stack (including ASP.NET MVC, Razor and Web API) under an open source license (Apache License 2.0). ASP.NET Web Forms was not included in this initiative.
Benefits of ASP.NET MVC
Following are the benefits of using ASP.NET MVC:−
Makes it easier to manage complexity by dividing an application into the model, the view, and the controller.
Enables full control over the rendered HTML and provides a clean separation of concerns.
Direct control over HTML also means better accessibility for implementing compliance with evolving Web standards.
Facilitates adding more interactivity and responsiveness to existing apps.
Provides better support for test-driven development (TDD).
Works well for Web applications that are supported by large teams of developers and for Web designers who need a high degree of control over the application behavior.
* The Model − A set of classes that describes the data you are working with as well as the business logic. There are two types of Models 1) Domain Model 2) View Model
* The View − Defines how the output will be displayed. It is a pure HTML, which decides how the UI is going to look like. The views are rendered by View Engines. We have 1) ASPX View Engine 2) Razor View Engine
* The Controller − A set of classes that handles communication from the user, overall application flow, and application-specific logic.