Big picture thoughts on software and other topics

February 12, 2008

ASP.NET MVC CTP 2 - Awesomeness

by Brian Donahue

Scott GuBroken Link: http://weblogs.asp.net/scottgu/ has posted an updated roadmap for ASP.NET MVCBroken Link: http://weblogs.asp.net/scottgu/archive/2008/02/12/asp-net-mvc-framework-road-map-update.aspx.  After playing around with the first CTPBroken Link: http://www.asp.net/downloads/3.5-extensions/ for a bit (even beginning to incorporate it into a client project), I decided to put it aside for a while and wait for CTP.  Mostly due to the testability story not being quite where I wanted for use in a "real" app.  Not saying I was surprised - after all, it is a CTP - but I wanted to give it a shot. 

Now, a new preview release is due to be released in a few weeks (to coincide with MIX 2008), and I'm getting excited again.  You should read Scott's post for the gory details, but here are the things that I'm pretty stoked about:

  1. Drop-in DLLs.  You can just drop the MVC dll into your bin and reference it - no setup or GAC'd assemblies needed.  I kind of thought you could do this already if you just found the DLLs the installer GAC'd, but I can't remember if we tested on an computer that didn't have the install.
  2. Improved Routing.  Routing was pretty cool in the first CTP, but was a little *too* simplistic.  Things like REST were not supported out of the box.  Sounds like Routing is getting some first class treatment, making it a stand-alone library (usable outside of MVC in other ASP.NET scenarios) and enabling more robust routing options.  This is key for an MVC framework.
  3. Filter Attributes Added.  Monorail has pretty nice support for controller filtersBroken Link: http://www.castleproject.org/monorail/documentation/v1rc2/usersguide/filters.html, such as "before action" and "after action" interceptors.  MVC CTP 2 willl have these, and ups the ante a bit with supporting filters right on the actions themselves, something that isn't available out of the box with Monorail (filters are added at the controller level and apply to all actions of that controller unless you place a SkipFilter on an action). 
  4. Refactoring.  Sounds like they've put some more work into the design of MVC to allow easier extensibility, pluggability, and perhaps most importantly, testability - especially of controllers.  Looking forward to playing around with Controller Factories, and perhaps implementing something closer to Monorail's Dynamic ActionsBroken Link: http://www.castleproject.org/monorail/documentation/v1rc2/advanced/dynactions.html, to streamline my controller setup. 
  5. Downloadable/Patchable/Compilable Source Code!!  That's right!  They are going to drop the source, and let us monkey patch [update: Scott corrects my usage below!] hack our hearts out.  This is AWESOME.  I can see myself losing days on end digging around in there, and causing myself all sorts of untold heartache.
Needless to say, I'm all geeked up once again for a new MVC CTP.  Who said Christmas only happens once a year?