Microsoft this week made available a final release of ASP.Net MVC 2, which provides a Model View Controller pattern for building Web applications leveraging ASP.Net.
Version 2 is available for Visual Studio 2008/Visual Web Developer 2008 Express with ASP.Net 3.5, said Scott Guthrie, corporate vice president in the Microsoft Developer Division, in a blog entry on Thursday evening. A release candidate for ASP.Net MVC 2 was offered last month.
“ASP.Net MVC 2 is the next significant update of ASP.Net MVC. It is a compatible update to ASP.Net MVC 1 — so all the knowledge, skills, code, and extensions you already have with ASP.Net MVC continue to work and apply going forward,” Guthrie said. “Like the first release, we are also shipping the source code for ASP.Net MVC under an OSI-compliant open source license.”
Features in version 2 include improved Visual Studio tooling support, strongly typed HTML helpers, and enhanced model validation support across client and server. Other improvements include auto-scaffold UI helpers with template customization and support for splitting large applications into “areas.”
Support also is included for JavaScript validation in the browser. In addition, developers can use DataAnnotation support in the .Net Framework to declaratively define and add validation rules to business objects and properties. Additional capabilities include asynchronous controllers support for executing long-running tasks in parallel, support for rendering subsections of a page/site using Html.RenderAction, and new helper functions, utilities, and API enhancements.
The MVC framework, according to Microsoft, encourages developers to maintain a separation of concerns among the responsibilities of applications, including UI logic via the view, user-input handling using the controller, and domain logic using the model. ASP.Net MVC applications can be tested using techniques such as test-driven development. The framework is built on ASP.Net 3.5 Service Pack 1, enabling developers to leverage features such as authentication and authorization, profile settings, and localization.
Version 2 can be installed side-by-side with ASP.Net MVC 1, so applications built with version 1 can run on the same computer as applications built with version 2, Guthrie said.
ASP.Net MVC 2 can be downloaded using the Microsoft Web Platform Installer and is also available for download at the Microsoft Download Center.