Gray's Matter
Justice Gray - North America's favorite metrosexual software consultant

I Wish These People Updated More Than Once a Year


This isn't as unrelated as it looks


[While watching the remainder of Scott Hanselman's new screencasts on the MVC, there were two things in particular that I found to be of such significance that they are getting their own posts.   What follows is every other change from Preview 1 that is mentioned in the remaining screencasts from Scott.]

  • The UI helper methods from the MVCToolKit are now actually part of the MVC dll.  There are also new helper methods  including BuildUrl, BuildUrlFromExpression and RouteLink among others.  They were not explored in the demos and I haven't looked at them yet, but I will attempt to look into them later to see what it is they do if no one else posts about it the next week or so.
  • The Html.ActionLink<>(lamba expression) is not new, but I need to point it out as it's a great way to have strongly typed ActionLinks (if you change your Controller or methods on it, you'll have a broken build rather than waiting to run and finding that out)
  • [As an aside, I can't get over how diplomatic Scott's tone is at certain points of these screencasts.  Here's my paraphrasing of his going over the different ways of doing Html.ActionLink and rendering form tags:
  • "Here are three methods of writing your a hrefs, and here are three methods of writing your form declarations.  There are different trade-offs to each method of doing this, so it's all about choice."
  • Scott is too nice to say it but I have no such worries.  Here are your tradeoffs:
    • two of the choices are lame
    • one of the choices uses lambdas and is the only strongly typed one out of the three, which means for those of you that don't understand lambdas, it may require an extra investment of a whole 3 minutes of your time to learn it
  • and since it's all about choice, it's also your choice to be a coding HERO or a complete professional outcast , spat upon in the street by all competent software developers.
  • Rob Conery's UpdateFrom() is in the new version, but *not* as an extension method on the object class - it is called by using Binding.UpdateFrom(yourObject, yourFormData).
  • Instead of having the MVC templates all bundled in to the already overcrowded main template window, they have now been placed into a separate heading under Web->MVC.
  • Bad news.  For those of you who got excited about Authorization and OutputCaching filter attributes shown on ScottGu's blog - they're not here; Scott mentions them as examples of "something you can build" and "we will probably have some in the next CTP" - not something that is, as yet, available.  If you want them, build them yourself!  The price of betas! 
  • I'm torn between laughing at the nerdiness of the comic book references in the CustomViewEngine demo and being in awe at seeing "Groo the Wanderer" being referenced in *anything*.
  • There's now wildcard support for routes in the frame of new Route("music/{*catchall}", where anything past the * is put into a parameter called "catchall".  This is actually nice for some complicated routing concerns.
To be continued with MVC bombshell #1 - the actual live *killing* of a project dead!  Well, not quite but it's quite a shot across the bow.

What am I talking about?  Come back in 30 minutes!

[update: the other three parts in this series can be found by clicking below:
MVC Preview 1 to Preview 2 Part A
MVC Bombshell #1
MVC Bombshell #2]


Thursday, March 06, 2008 #