It was another early start this morning for 3 members of the programming team (myself, Jon and Simon), to get to the Microsoft offices in Victoria for today’s Web Camps event, but it’s been well worth it…
Jon Galloway works in Scott Hanselman’s team (“Our team’s job is to make sure that you’re having a good time developing with Microsoft tools” – you’ve gotta love that) and along with Christian Wenz delivered an entertaining mixture of slides and demos which was worth getting up at 5am for. The schedule took attendees all the way from a snapshot of the Microsoft web platform as it stands today, right through some of the latest features of both web forms and ASP.NET MVC, and finished the day with a few associated topics such as jQuery, web deployment and IIS extensions.
Web developers using the Microsoft technology stack now have a choice of approaches when developing web applications:
However, web forms is still a leaky abstraction; for example the existence of the “__VIEWSTATE” hidden field removes the overhead of state management for the developer, however the price to be paid is increased HTML page weight and potential SEO issues as spiders chomp their way through encoded data in the search for semantically significant content.
Being shown the evolutionary improvements to web forms and knowing that we were covering MVC next, I couldn’t help but feel like I was in a car showroom being shown the cup holders and sat-nav in this year’s Renault Megane, knowing very well that the dealer next door was about to offer me an Aston Martin for the same price.
For the record, our family car is a Scenic, and great cars they are too But you see what I’m getting at; the web forms model has its place, carries some benefits of its own, and continues to be supported by Microsoft. But the MVC pattern is a great fit for the HTTP protocol and client/server architecture, and a supported, native implementation for ASP.NET has been a long time coming when compared to other web frameworks (such as Ruby on Rails, Java J2EE). As Christian pointed out, it’s completely possible to write clean, well architected code with web forms, but it requires discipline to maintain this standard. Separating out the view, which acts as a ‘puppet’ simply displaying the model that it is provided with, and having this response orchestrated by a controller class and associated helpers not only improves testability of web applications, but also sets the tone for a cleaner architecture from the moment a developer clicks File -> New.
Some of my concerns about front-end developers maintaining MVC views were put to rest later in the afternoon, when the sessions covered HTML helpers and specifically templated helpers. Also touching upon dynamic data reminded me of the power of this scaffolding technology, particularly for anyone creating back-office administration systems. The ADO.NET Entity Framework was used throughout the sessions for data access, and the level of integration in the IDE, as well as with the rest of the web technology stack just demonstrated the level of investment Microsoft have made in their O/RM offering. It struck me that EF is far more mature in this release than when I first spoke to Eric Nelson about it at DevWeek in 2009 (as you’d expect), again all really exciting stuff for us Microsoft-focussed web geeks.
All in all, plenty to take in and plenty more to think about; many thanks to Jon and Christian for squeezing so much in. For anyone interested in further reading on any of these technologies, I’ve included some useful URL’s below: