MVC Routes and Magic Strings == “No Good”

added by RMuth
3/1/2010 9:49:55 AM


I live and breath with ASP.NET MVC, but from the very beginning I’ve been very uncomfortable with the magic string nature of routes, controllers, and actions. I long ago stopped using the various “action” extensions because they are way too prone to fat finger screw ups and moved nearly 100% to using route extensions and putting my routes names into constants so as not to have any chance of fat finger issues, but recently, after reviewing the source code for MVC2, specifically the “LabelFor” extension, I realized there was even another way to limit fat finger screw ups via routing extensions and lambdas.