ArticleslgStudy

computer science

ASP.NET MVC

ASP.NET MVC is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand ASP.NET MVC rather than just read about it. In short: ASP.NET MVC is a web application framework developed by Microsoft that implements the model–view–controller (MVC) pattern. It is no longer in active development.

Key takeaways

  • ASP.NET MVC belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect ASP.NET MVC to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of ASP.NET MVC from memory before moving on to harder problems.

Reference excerpt

ASP.NET MVC is a web application framework developed by Microsoft that implements the model–view–controller (MVC) pattern. It is no longer in active development. It is open-source software, 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 (a platform using only Razor 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, Microsoft, GoDaddy and Ancestry.com.

Background Based on ASP.NET, ASP.NET MVC allows software developers to build a web application 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 (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-based contracts, thereby allowing each component to be tested independently.

Apache License 2.0 release In March 2012, Scott Guthrie announced on his blog that 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). 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. ASP.NET Web Forms was not included in this initiative for various reasons.

Release history

Project structure

View engines The view engines used in the ASP.NET MVC 3 and MVC 4 frameworks are Razor 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 model, any interactions are routed to the controllers using the ASP.NET Routing mechanism. Views can be mapped to different URLs. 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 is an implementation of the naked objects pattern using ASP.NET MVC.

See also

Model–view–viewmodel Model–view–adapter Model–view–presenter Observer pattern Presentation–abstraction–control Hierarchical model–view–controller

References

Further reading Jon Galloway, Phil Haack, Brad Wilson, and K. Scott Allen, Professional ASP.NET MVC 3, Wrox, 2011, ISBN 1-118-07658-3 Jeffrey Palermo, Jimmy Bogard, Eric Hexter, Matthew Hinze, and Jeremy Skinner, ASP.NET MVC 4 in Action, Manning Publications, 2012, ISBN 978-1617-29041-1 Steven Sanderson, Adam Freeman, Pro ASP.NET MVC 3 Framework, Second Edition, Apress, 2011, ISBN 1-4302-3404-0 Jonathan McCracken, Test-Drive ASP.NET MVC, Pragmatic Bookshelf, 2010, ISBN 1-934356-53-0 Stephen Walther, ASP.NET MVC Framework Unleashed, Sam's, 2009, ISBN 0-672-32998-0 Arnaud Weil, Learn ASP.NET MVC, 2015, ISBN 1-32648303-X Andrew Lock, ASP.NET Core in Action, Manning Publications, 2018, ISBN 978-1617-29461-7

External links Official website

Worked examples

Example 1 — a first encounter with ASP.NET MVC

Start with the simplest possible case. Write down what ASP.NET MVC claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to ASP.NET MVC before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about ASP.NET MVC ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of ASP.NET MVC

In research
ASP.NET MVC appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses ASP.NET MVC in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
ASP.NET MVC is common in secondary-school and first-year university syllabi. It links to neighbouring topics ASP.NET, Free software programmed in C Sharp, Microsoft free software, so understanding it makes those chapters shorter.
In everyday life
Look for ASP.NET MVC outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “ASP.NET MVC” →

How to study ASP.NET MVC in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what ASP.NET MVC means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain ASP.NET MVC out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is ASP.NET MVC in simple terms?

ASP.NET MVC is a web application framework developed by Microsoft that implements the model–view–controller (MVC) pattern. It is no longer in active development.

Why does ASP.NET MVC matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study ASP.NET MVC?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on ASP.NET MVC.

Tags

  • ASP.NET
  • Free software programmed in C Sharp
  • Microsoft free software
  • Software using the Apache license
  • Web frameworks

Keep exploring