MVC routing changes - been there

2008-04-12 @ 22:39#

i noticed this post that talks about the upcoming changes to ASP.NET MVC routing routines. basically some 'special characters' will no longer have special meaning. it's a good change, but it will break some things. hey, it happens.

i struggled with establishing a routing service when i started the exyus engine last year. at first, i thought it'd use the existing UrlTemplate class from the new 3.5 update. but not only is it 'new', it's a bit odd. the above changes attest to that. i then considered implementing the URI Templates pattern. but it was not really suited for routing.

that's when i bit the bullet and just used Regular Expressions to handle evaulating the incoming requests. it's clean, it's well-tested, it's standard.

it's also a bit hard to grok at first. several folks have chided me on using RegEx ("it's too hard!"). i stand by my decision. no reason to sugar-coat things here. you want routing based on evaluating strings? you think you can write a better evaluation engine than RegEx? hey, go nutz.

let me know when it all works, i'll check it out.

code