ASP.NET MVC 2 in Action Hot on the heels of the groundbreaking release of ASP.NET MVC 1.0, the ASP.NET MVC team at Microsoft has already released the first Community Technology Preview (CTP) of version 2. I have already predicted that Microsoft’s MVC Framework will become the new way to develop Web applications on top of ASP.NET. In this article, I will give a first look at the plans for version 2 and some of the features that already work in the first CTP. Microsoft is targeting the second release of the ASP.NET MVC Framework for the enterprise customer. The main two themes that Microsoft is focusing on are: - Improved productivity
- Enterprise ready
Some companies are already leveraging ASP.NET MVC 1.0 on large systems. Others are slower to adopt. At this time, Microsoft released MVC 1.0 only about 6-8 ago and some more conservative clients are still using Visual Studio 2005 for development. With the pace of Microsoft’s releases, I believe we will see a large number of companies who haven’t adopted .NET 3.5 yet jump straight to .NET 4.0. When Visual Studio 2010 releases, many companies will feel the strong urge to upgrade development platforms so that they aren’t left behind. It is not a good place to be when you are two versions behind current. If a large number of companies jump to Visual Studio 2010, I think we’ll see a massive retooling of these developers. Not only will they pick up C# 4.0, but they will also have a choice between Web Forms and MVC. Most of these developers who are retooling will choose ASP.NET MVC because of its refreshing simplicity and also because of the massive productivity enhancements over Web Forms. While Web Forms continues to dominate the designer experience, ASP.NET MVC marches on toward enhanced productivity in code, not in the designer. This is one of its greatest strengths, and libraries like MvcContrib add to the benefits of adoption. This article is an introduction to ASP.NET MVC 2 using CTP 1. It assumes knowledge of version 1, which you can gain by reading one of the several books on the topic such as ASP.NET MVC in Action (Palermo, Scheirman, Bogard, published by Manning Publications Co.): http://mvcbook.jeffreypalermo.com/. Let me first discuss some of the plans for version 2 and then run through some examples that are possible with the CTP 1 bits. Version 2 Release Plan Microsoft has a detailed roadmap on the CodePlex site that they keep up to date at http://aspnet.codeplex.com. Their published theme is to improve productivity and make the framework enterprise ready. What that means is up to the reader, but some of the major areas on which they are working are: - Templated helpers
- Areas
- Support for data annotations
- Client validation
- Asynchronous controller actions
- Fixing known issues
The first three have some working bits in the first CTP, and I will look at that code in this article. First, I’d like to give some commentary on the deployment configuration and then the implications of each of these major features and why you should or should not care about them. The CTP includes pretty good implementations of template helpers as well as the data annotation and model binder validation. Dependencies and Runtime ASP.NET MVC 2 will ship in the box with Visual Studio 2010, but it will also be available as an add-in for Visual Studio 2008 SP1. The server will require .NET 3.5 SP1 minimum to run a version 2 Web application. It will also work seamlessly with MSDeploy for deploying apps to IIS, file locations, FTP and more. If you aren’t familiar with MSDeploy, think of it as the .NET WAR file (from the Java space). It will allow you to package up your ASP.NET MVC application in a single zip file and deliver it to your production server administrators. Then, your server administrators will be able to unpack your deploy package and run an installation routine you created on the production server. Automated deployment packages are long overdue, and MSDeploy is the ticket to not rolling your own installation frameworks like many of us have. Check out http://blogs.msdn.com/webdevtools/archive/2009/03/10/how-does-web-deployment-with-vs10-and-msdeploy-work.aspx for more info on MSDeploy from Vishal Joshi. | & | | 
By: Jeffrey Palermo
Jeffrey Palermo is a software management consultant and the CTO of Headspring Systems in Austin, TX. His company specializes in Agile coaching and helps companies double the productivity of software teams. Jeffrey is a MCSD.NET , Microsoft MVP, Certified Scrummaster, Austin .Net User Group leader, AgileAustin board member, INETA speaker, INETA Membership Mentor, Christian, husband, father, motorcyclist, Eagle Scout, U.S. Army Veteran, and Texas A&M University graduate.
Headspring Systems is available for consulting. We can coach your software team or deliver custom software quickly to match your needs. We specialize in software architecture and design, technical coaching, software management coaching, software business analysis, business leadership, technical recruiting, C#, .NET, agile, lean, extreme programming, and scrum.
code@palermo.cc |