ASP.NET MVC

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

ASP.NET MVC
DeveloperMicrosoft
Final release
5.3.0 / 23 October 2023; 2 years ago (2023-10-23)[1]
Preview release
6.0.0-rc2 / 17 May 2016; 9 years ago (2016-05-17)[2]
Repository
  • {{URL|example.com|optional display text}}Lua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).
Written inC#, VB.NET[3]
Engine
    Lua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).
    Operating systemCross-platform
    Platform.NET Framework, Mono
    SuccessorASP.NET Core
    TypeWeb application framework
    LicenseApache License 2.0

    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[citation needed]. 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".[4]

    Some well known sites that use ASP.NET MVC include Stack Overflow,[5] Microsoft, GoDaddy and Ancestry.com.[6][needs update]

    Background

    [edit | edit source]

    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.[7]

    In April 2009, the ASP.NET MVC source code was released under the Microsoft Public License (MS-PL).[8]

    "ASP.NET MVC framework is a lightweight,[9] 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."[10]

    The ASP.NET MVC framework couples the models, views, and controllers using interface-based contracts, thereby allowing each component to be tested independently.[citation needed]

    Apache License 2.0 release

    [edit | edit source]

    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).[11]

    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.[12]

    Release history

    [edit | edit source]
    Release history
    Date Version
    10 December 2007 ASP.NET MVC CTP
    13 March 2009 ASP.NET MVC 1.0[13]
    16 December 2009 ASP.NET MVC 2 RC[14]
    4 February 2010 ASP.NET MVC 2 RC 2[15]
    10 March 2010 ASP.NET MVC 2[16]
    6 October 2010 ASP.NET MVC 3 Beta[17]
    9 November 2010 ASP.NET MVC 3 RC[17]
    10 December 2010 ASP.NET MVC 3 RC 2[18]
    13 January 2011 ASP.NET MVC 3[19]
    20 September 2011 ASP.NET MVC 4 Developer Preview[20]
    15 February 2012 ASP.NET MVC 4 Beta[21]
    31 May 2012 ASP.NET MVC 4 RC[22]
    15 August 2012 ASP.NET MVC 4[23]
    30 May 2013 ASP.NET MVC 4 4.0.30506.0[24]
    26 June 2013 ASP.NET MVC 5 Preview[25]
    23 August 2013 ASP.NET MVC 5 RC 1[26]
    17 October 2013 ASP.NET MVC 5[26]
    17 January 2014 ASP.NET MVC 5.1[26]
    10 February 2014 ASP.NET MVC 5.1.1[26]
    4 April 2014 ASP.NET MVC 5.1.2[26]
    22 June 2014 ASP.NET MVC 5.1.3[26]
    1 July 2014 ASP.NET MVC 5.2.0[26]
    28 August 2014 ASP.NET MVC 5.2.2[26]
    9 February 2015 ASP.NET MVC 5.2.3[26]
    12 February 2018 ASP.NET MVC 5.2.4[27]
    2 May 2018 ASP.NET MVC 5.2.5[28]
    11 May 2018 ASP.NET MVC 5.2.6[26]
    29 November 2018 ASP.NET MVC 5.2.7[26]
    12 April 2022 ASP.NET MVC 5.2.8[26]
    31 May 2022 ASP.NET MVC 5.2.9[26]
    23 October 2023 ASP.NET MVC 5.3.0 (Current)

    Project structure

    [edit | edit source]
    • 📁 Application
      • 📁 Controllers
        • 🗎 PetController.cs
      • 📁 Models
        • 🗎 PetViewModel.cs
      • 📁 Views
        • 📁 Pet
          • 🗎 Create.cshtml
          • 🗎 Delete.cshtml
          • 🗎 Edit.cshtml
          • 🗎 Index.cshtml

    View engines

    [edit | edit source]

    The view engines used in the ASP.NET MVC 3 and MVC 4 frameworks are Razor and the Web Forms.[29][30] 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.[31] 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.[7]

    Other view engines:

    • The MVCContrib library contains 8 alternate view engines. Brail, NDjango, NHaml, NVelocity, SharpTiles, Spark, StringTemplate and XSLT.[32]
      • The StringTemplate View Engine utilizes a .NET port of the Java templating engine, StringTemplate.[33]
      • Spark is a view engine for the ASP.NET MVC (and the Castle Project MonoRail) frameworks.[34]
      • 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.[35]
    • Naked Objects for .NET is an implementation of the naked objects pattern using ASP.NET MVC.

    See also

    [edit | edit source]

    Lua error in mw.title.lua at line 392: bad argument #2 to 'title.new' (unrecognized namespace name 'Portal').

    References

    [edit | edit source]
    1. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    2. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    3. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    4. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    5. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    6. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    7. ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    8. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    9. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    10. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    11. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    12. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    13. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    14. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    15. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    16. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    17. ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    18. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    19. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    20. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    21. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    22. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    23. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    24. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    25. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    26. ^ a b c d e f g h i j k l m Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    27. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    28. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    29. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    30. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    31. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    32. ^ MVCContrib
    33. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    34. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    35. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).

    Further reading

    [edit | edit source]
    • Jon Galloway, Phil Haack, Brad Wilson, and K. Scott Allen, Professional ASP.NET MVC 3, Wrox, 2011, Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    • Jeffrey Palermo, Jimmy Bogard, Eric Hexter, Matthew Hinze, and Jeremy Skinner, ASP.NET MVC 4 in Action, Manning Publications, 2012, Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    • Steven Sanderson, Adam Freeman, Pro ASP.NET MVC 3 Framework, Second Edition, Apress, 2011, Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    • Jonathan McCracken, Test-Drive ASP.NET MVC, Pragmatic Bookshelf, 2010, Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    • Stephen Walther, ASP.NET MVC Framework Unleashed, Sam's, 2009, Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    • Arnaud Weil, Learn ASP.NET MVC, 2015, Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    • Andrew Lock, ASP.NET Core in Action, Manning Publications, 2018, Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    [edit | edit source]
    • Lua error in Module:Official_website at line 94: attempt to index field 'wikibase' (a nil value).