Hanselminutes on 9 - ASP.NET MVC 2 Preview 1 Released
I was up in Redmond this week and stopped by to visit my Video Portal in Phil's Office. I wanted to see where I virtually sit.
While I was there, Phil gave me/us/you a tour of ASP.NET MVC 2 Preview 1.
Be sure to read ScottGu's post on ASP.NET MVC 2. The best point:
- Today’s preview works with .NET 3.5 SP1 and VS 2008, and can be installed side-by-side on the same machine as ASP.NET MVC 1.0 (meaning they don’t conflict and your existing ASP.NET MVC 1.0 projects will not be impacted if you install it).
Quoting from the ASP.NET MVC Roadmap, the theme for ASP.NET MVC 2 is "Improved Productivity and Enterprise Ready."
ASP.NET MVC 2 Features
Preview 1 - Early August
- Templated Helpers - allow you to automatically associate edit and display elements with data types. For example, a date picker UI element can be automatically rendered every time data of type System.DateTime is used. This is similar to Field Templates in ASP.NET Dynamic Data.
- Areas - provide a means of dividing a large web application into multiple projects, each of which can be developed in relative isolation. This helps developers manage the complexity of building a large application by providing a way to group related controllers and views.
- Support for Data Annotations - Data Annotations enable attaching validation logic in a central location via metadata attributes applied directly to a model class. First introduced in ASP.NET Dynamic Data, these attributes are now integrated into the default model binder and provide a metadata driven means to validating user input.
Preview 2 and beyond
- Client Validation - builds on top of the Templated Helpers and Data Annotations work done in Preview 1 to provide client-side validation based on the model's validation attributes. This provides for a more responsive experience for users filling out a form with validation.
- Strongly-typed input helpers – allow generating form input fields using code expressions against the model. This allows the helpers to take advantage of Data Annotations attributes applied to the model and reduces errors caused by lack of strong typing such as typos.
- Strongly-typed link helpers – allow developers to take advantage of Intellisense support (due to the strong typing) to discover which controllers and actions are available for linking.
- Asynchronous Controller Actions - provides a programming model for writing actions that can call external resources without blocking a thread. This can increase the scalability of a site that needs to interact with web services and other external services.
- Areas - continued refining of the Areas feature, enabling a single project approach for developers who wish to organize their application without requiring multiple projects.
- Other Improvements - continue to fix known issues carried over from ASP.NET MVC 1.0 as well as ASP.NET MVC 2 Preview 1. Also including API improvements based on user feedback along with minor new features.
There's lots of cool stuff (release notes are here) and in this video Phil shows off Templated Helpers. There's a walkthrough of Templated Helpers in the Pre-Release Documentation as well.
Remember, it's a preview, so there's still time to give feedback. Blog about it, complain in the forums, or bug us on Twitter.
I hope you enjoy the video!
Related Links
- Download Page for ASP.NET MVC 2 Preview 1
- ASP.NET MVC Overview on MSDN
- ASP.NET MVC Reference Documentation on MSDN
- ASP.NET MVC website
- ASP.NET CodePlex site
- ASP.NET MVC Forums
- CodingQA Podcast with the ASP.NET QA Team
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
About Newsletter
That is on the list for future previews. We have been playing around with a few different approaches and are trying to figure out which approach feels best.
Thanks,
Scott
I am really looking forward to this as it will make the code more refactor-friendly. :)
Ugh... makes me wish I had MVC 2 for the current project I'm building. Looks like I may have to totally rewrite it once MVC 2 is out - so much goodness. ;D
send me answer to
anirudhakumar.gupta@gmail.com
Comments are closed.