ASP.NET Model-View-Controller Framework 3 Release Candidate Available

The Model-View-Controller architectural pattern continues to prove itself so invaluable at separating and decoupling domain concerns thirty years after its conception, that companies are still implementing it on top of their platforms. Microsoft originally released the Community Technological Preview of their MVC framework for ASP.NET at the end of 2007, and then in 2009 released the first version of it. A year later, in 2010, they released the second version, and that puts the third version on track to most likely be officially released in March 2011. They recently made the MVC 3 Release Candidate available, and it is backwards compatible with MVC version 1 and version 2, so developers can begin working on integrating the new features into existing MVC applications in preparation for the final release.

While third-party MVC frameworks for ASP.NET exist, and even Microsoft’s own MVC V1 and V2 enable swappable “View Engines” to support alternative view handling, the official MVC framework will provide the best integration and support. Current and past implementations of the official ASP.NET MVC framework used Web Forms as the view engine, which made a rather easy transition to the framework from typical ASP.NET Web Forms pages. MVC 3 for ASP.NET will include a new View Engine called Razor. Razor does away with the Web Forms model and uses inline code for a template system without code block delimiters. You can mix the Razor code inside the HTML. The MVC V3 framework Release Candidate includes many updated features for ASP.NET developers. A major breakthrough is the partial caching of pages, or what’s commonly known as donut caching, where the “donut” is cached and the “hole” is generated. Parts of the page can be optimized for caching while still maintaining dynamic content areas. Another included technology is the NuGet package utility, formerly known as NuPack. NuGet packages ASP.NET code into easily shareable software packages that can be pulled down as needed. It should greatly facilitate reusing and distributing code than traditional methods. Also, in a surprise move, the JavaScript used in the MVC 3 framework is Unobtrusive JavaScript, which is a boon for accessibility among other things such as, cleaner markup. JavaScript validation is enabled by default and uses jQuery with the jQuery Validation plugin. The JSON binding is much improved, and Visual Studio gains better wizards and IntellSense for Razor.

Several caveats about using the MVC version 3 ASP.NET framework Release Candidate exist. For one, it will not work on Windows XP machines. Also, if you have any previous Beta versions or CTP versions they must be uninstalled before installing the Release Candidate version. Other Beta or CTP releases for ASP.NET can also affect proper installation and should be uninstalled as well. And, while it is backwards compatible, it has been reported that creating a new MVC 3 project and moving all the old project files into the new project should help with other errors. The MVC 3 framework for ASP.NET looks to be a game-changer, especially with Razor integration. With the release candidate available for download and even production use, developers can start exploring the possibilities and updating legacy code in anticipation of the final official release.

Published
Categorized as ASP

By Taylor Gillespie

Taylor is a Staff Writer for DevWebPro

Leave a comment