Microsoft PDC Day 1

I’ve traveled all the way from San Diego, CA to Los Angeles, CA this week to attend Microsoft’s Professional Developer’s Conference — watch out L.A. you’re about to be overrun by some pretty serious nerds!

I guess the big announcement of the day was Microsoft’s new Windows Azure cloud computing platform. This is their answer to things like Amazon’s EC2 or Google’s App Engine. The technology seemed pretty cool and may be something I use for future side-projects, but I didn’t dive into it too deeply today since HP (my employer) is unlikely to be outsourcing their datacenters to Microsoft anytime soon (HP fancies itself to be quite the datacenter expert these days).

For me, the most interesting session of the day was Phil Haack’s talk on the new ASP.NET MVC framework (session replay). This is something that I’ve been interested in for some time now, but haven’t yet had the opportunity to play with. As someone who splits his time pretty evenly between Java and .NET programming, there’s always been a major mental context switch that I have to go through when moving from Struts or Spring MVC in the Java world to ASP.NET Web Forms in the .NET world. The programming models are radically different.

On the other hand, ASP.NET MVC now brings to the .NET platform all of the things that I know and love about the MVC development model:

I’ve looked at a lot of the ASP.NET MVC sample code that have been released and the one that I did find disturbing was the amount of code present in the views. MVC is able to leverage the good ol’ ASPX page as a view layer and you’ll often see things like this is the samples:

<p>Please fill out the following form:</p>
<% using(Html.Form("Home", "Index")) { %>
	<input type="text" name="firstname">
	...
<% } %>

In the Java world we’ve been told for years “keep Java code out of your JSPs”, yet here we’ve got some pretty strange looking C# code mingling with our HTML markup (this is actually a pretty clever use of the IDisposable pattern to create a form-scope within the page, but really this sort of code has no business in the view). In Java, this sort of scenario is typically handled by using things like the Java Standard Tag Library (JSTL), the JSP Expression Language or a custom tag library. These things don’t have any counterparts in the ASP.NET MVC world . . . yet.

I was very encouraged to hear Phil say that one of the things they are going to work on is a set of “declarative helpers” that will serve as an alternative to inline C# code within the ASPX view. If true, this would eliminate the one reservation that I currently have about using the ASP.NET MVC framework. Phil is supposed to be in the expo hall this afternoon answering questions and I’m hoping to talk to him about their plans in this area.

Great stuff!

October 28, 2008 • Posted in: programming

Leave a Reply