ASP.NET MVC is a
web application framework
A web framework (WF) or web application framework (WAF) is a software framework that is designed to support the development of web applications including web services, web resources, and web APIs. Web frameworks provide a standard way to build and ...
developed by Microsoft that implements the
model–view–controller
Model–view–controller (MVC) is a software architectural pattern commonly used for developing user interfaces that divide the related program logic into three interconnected elements. This is done to separate internal representations of infor ...
(MVC) pattern. It is no longer in active development. It is
open-source software
Open-source software (OSS) is computer software that is released under a license in which the copyright holder grants users the rights to use, study, change, and distribute the software and its source code to anyone and for any purpose. Ope ...
, apart from the ASP.NET Web Forms component, which is
proprietary.
ASP.NET Core has since been released, which unified
ASP.NET, ASP.NET MVC, ASP.NET Web API, and
ASP.NET Web Pages
Razor is an ASP.NET programming syntax used to create dynamic web pages with the C# or VB.NET programming languages. Razor was in development in June 2010 and was released for Microsoft Visual Studio 2010 in January 2011. Razor is a simple-synta ...
(a platform using only
Razor
A razor is a bladed tool primarily used in the removal of body hair through the act of shaving. Kinds of razors include straight razors, safety razors, disposable razors, and electric razors.
While the razor has been in existence since before t ...
pages). MVC 6 was abandoned due to Core and is not expected to be released. Core is currently planned to merge into ".NET 5".
Some well known sites that use ASP.NET MVC include
Stack Overflow
In software, a stack overflow occurs if the call stack pointer exceeds the stack bound. The call stack may consist of a limited amount of address space, often determined at the start of the program. The size of the call stack depends on many facto ...
,
Microsoft
Microsoft Corporation is an American multinational corporation, multinational technology company, technology corporation producing Software, computer software, consumer electronics, personal computers, and related services headquartered at th ...
,
GoDaddy
GoDaddy Inc. is an American publicly traded Internet domain registrar and web hosting company headquartered in Tempe, Arizona, and incorporated in Delaware.
, GoDaddy has more than 21 million customers and over 6,600 employees worldwide. The ...
and
Ancestry.com
Ancestry.com LLC is an American genealogy company based in Lehi, Utah. The largest for-profit genealogy company in the world, it operates a network of genealogical, historical records, and related genetic genealogy websites.
In November 2018, ...
.
Background
Based on
ASP.NET, ASP.NET MVC allows software developers to build a
web application
A web application (or web app) is application software that is accessed using a web browser. Web applications are delivered on the World Wide Web to users with an active network connection.
History
In earlier computing models like client-serve ...
as a composition of three roles: ''Model'', ''View'' and ''Controller''.
The MVC model defines web applications with 3 logic layers:
* Model (business layer)
* View (display layer)
* Controller (input control)
A ''model'' represents the state of a particular aspect of the application. A ''controller'' handles interactions and updates the model to reflect a change in state of the application, and then passes information to the view. A ''view'' accepts necessary information from the controller and renders a user interface to display that information.
In April 2009, the ASP.NET MVC source code was released under the
Microsoft Public License
The Shared Source Initiative (SSI) is a source-available software licensing scheme launched by Microsoft in May 2001. The program includes a spectrum of technologies and licenses, and most of its source code offerings are available for download aft ...
(MS-PL).
"ASP.NET MVC framework is a lightweight, highly testable presentation framework that is integrated with 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."
The ASP.NET MVC framework couples the models, views, and controllers using
interface
Interface or interfacing may refer to:
Academic journals
* ''Interface'' (journal), by the Electrochemical Society
* '' Interface, Journal of Applied Linguistics'', now merged with ''ITL International Journal of Applied Linguistics''
* '' Int ...
-based contracts, thereby allowing each component to be tested independently.
Apache License 2.0 release
In March 2012,
Scott Guthrie
Scott Guthrie is Executive Vice President of the Cloud and AI group in Microsoft.
He leads the teams that deliver Microsoft Azure, Dynamics 365, Visual Studio, Visual Studio Code, GitHub, .NET, Hololens, Microsoft SQL Server
Microsoft SQ ...
announced on his blog that Microsoft had released part of its web stack (including ASP.NET MVC,
Razor
A razor is a bladed tool primarily used in the removal of body hair through the act of shaving. Kinds of razors include straight razors, safety razors, disposable razors, and electric razors.
While the razor has been in existence since before t ...
and Web API) under an open source license (
Apache License 2.0).
Guthrie wrote that "Doing so will enable a more open development model where everyone in the community will be able to engage and provide feedback on code checkins, bug-fixes, new feature development, and build and test the products on a daily basis using the most up-to-date version of the source code and tests."
The source code now resides on
CodePlex
CodePlex was a forge website by Microsoft. While it was active, it allowed shared development of open-source software.
Its features included wiki pages, source control based on Mercurial, TFVC, Subversion or Git, discussion forums, issue tr ...
. ASP.NET Web Forms was not included in this initiative for various reasons.
Release history
View engines
The view engines used in the ASP.NET MVC 3 and MVC 4 frameworks are
Razor
A razor is a bladed tool primarily used in the removal of body hair through the act of shaving. Kinds of razors include straight razors, safety razors, disposable razors, and electric razors.
While the razor has been in existence since before t ...
and the Web Forms. Both view engines are part of the MVC 3 framework. By default, the view engine in the MVC framework uses Razor
.cshtml
and
.vbhtml
, or Web Forms
.aspx
pages to design the layout of the user interface pages onto which the data is composed. However, different view engines can be used. Additionally, rather than the default ASP.NET Web Forms
postback In web development, a postback is an HTTP POST to the same page that the form is on. In other words, the contents of the form are ''POST''ed ''back'' to the same URL as the form.
Postbacks are commonly seen in edit forms, where the user introduces ...
model, any interactions are routed to the controllers using the ASP.NET
Routing
Routing is the process of selecting a path for traffic in a network or between or across multiple networks. Broadly, routing is performed in many types of networks, including circuit-switched networks, such as the public switched telephone netw ...
mechanism. Views can be mapped to different
URL
A Uniform Resource Locator (URL), colloquially termed as a web address, is a reference to a web resource that specifies its location on a computer network and a mechanism for retrieving it. A URL is a specific type of Uniform Resource Identifi ...
s.
Other view engines:
* The MVCContrib library contains 8 alternate view engines. Brail, NDjango, NHaml, NVelocity, SharpTiles, Spark, StringTemplate and XSLT.
** The StringTemplate View Engine utilizes a .NET port of the Java templating engine, StringTemplate.
** Spark is a view engine for the ASP.NET MVC (and the Castle Project MonoRail) frameworks.
** NDjango is a port of the
Django web framework's templating language to .NET. It is written in F# and comes with Visual Studio extension including full Intellisense support.
*
Naked Objects for .NET Naked Objects for .NET or Naked Objects MVC is a software framework that builds upon the ASP.NET MVC framework.
As the name suggests, the framework synthesizes two architectural patterns: naked objects and model–view–controller (MVC). These t ...
is an implementation of the
naked objects Naked objects is an architectural pattern used in software engineering. It is defined by three principles:
The naked object pattern's innovative feature arises by combining the and principles into a principle:
The naked objects pattern was ...
pattern using ASP.NET MVC.
See also
*
Model–view–viewmodel
Model–view–viewmodel (MVVM) is an architectural pattern in computer software that facilitates the separation of the development of the graphical user interface (GUI; the ''view'')—be it via a markup language or GUI code—from the developme ...
*
Model–view–adapter
Model–view–adapter (MVA) or mediating-controller MVC is a software architectural pattern and multitier architecture. In complex computer applications that present large amounts of data to users, developers often wish to separate data (model) an ...
*
Model–view–presenter
Model–view–presenter (MVP) is a derivation of the model–view–controller (MVC) architectural pattern, and is used mostly for building user interfaces.
In MVP, the ''presenter'' assumes the functionality of the "middle-man". In MVP, all pr ...
*
Observer pattern
In software design and engineering, the observer pattern is a software design pattern in which an object, named the subject, maintains a list of its dependents, called observers, and notifies them automatically of any state changes, usually by ...
*
Presentation–abstraction–control
*
Hierarchical model–view–controller
Hierarchical model–view–controller (HMVC) is a software architectural pattern, a variation of model–view–controller (MVC) similar to presentation–abstraction–control (PAC), that was published in 2000 in an article in JavaWorld Magazi ...
References
Further reading
* Jon Galloway, Phil Haack, Brad Wilson, and K. Scott Allen, ''Professional ASP.NET MVC 3'', Wrox, 2011,
* Jeffrey Palermo, Jimmy Bogard, Eric Hexter, Matthew Hinze, and Jeremy Skinner, ''ASP.NET MVC 4 in Action'', Manning Publications, 2012,
* Steven Sanderson, Adam Freeman, ''Pro ASP.NET MVC 3 Framework, Second Edition'', Apress, 2011,
* Jonathan McCracken, ''Test-Drive ASP.NET MVC'', Pragmatic Bookshelf, 2010,
* Stephen Walther, ''ASP.NET MVC Framework Unleashed'', Sam's, 2009,
* Arnaud Weil, ''Learn ASP.NET MVC'', 2015,
* Andrew Lock, ''ASP.NET Core in Action'', Manning Publications, 2018,
External links
*
{{DEFAULTSORT:Asp.Net Mvc
MVC
Free software programmed in C Sharp
Software using the Apache license
Web frameworks
Microsoft free software