ASP.NET MVC 3 Go-Live License
Microsoft’s ASP.NET team has taken the Agile philosophy of Deploy Early, Deploy Often to heart. Close on the heels of ASP.NET MVC 2, version 3 beta has already been approved for production use. With a whole host of promising new features including the Razor syntax, this will be a hard release to ignore.
We’ve talked about Razor before, one of the four major view engines for ASP.NET MVC. This release brings the VB version of Razor as well as enhancements to the C# version of Razor. Both versions of razor are significantly better than the old <% syntax, though they both bring baggage from their respective parent languages.
ASP.NET MVC changed the validation model. With version 2, potentially dangerous user-entered content will be rejected or accept at the form level. In version 3, input validation can be turned off on a field-by-field basis.
Serious thought has been given to dependency injection. Three new interfaces have been introduced, IControllerActivator, IDependencyResolver, and IViewActivator. The dependency resolver can be used to inject model validation, metadata, and value providers as well as model binders. The goal here isn’t just to make Microsoft’s offering more flexible, but to actually allow developers swap out all of the underpinnings.
Unlike the version 1 to 2 upgrade, there is only one intentional breaking change. Exception filters have been promoted ahead controllers with the same Order value. Also, more specific exception filters will be applied before general ones. Of course it is still recommended that each controller and exception filter be given a unique Order value.
ASP.NET MVC 3 runs side-by-side with versions 1 and 2. Developers wishing to upgrade existing projects must follow the instructions in the release notes. As mentioned before, this beta has been approved for production use with a “go live” license. But it is a beta, so it is subject to change between now and the final release. Under known issues, Intellisense for Razor is not currently available. Also, strongly typed views cannot by typed as arrays.
Caitie McCaffrey Apr 24, 2015