I’m not a web developer.
Anyone that knows me knows this.
I’m bad with ASP.NET Web Forms these days in that I understood it when it shipped back in 2002 and I’ve kind of lost track of it in the meantime although I can talk about it at “some level”. I think I was ok up until V2.0 but when all the AJAX bits started to creep in I started to get a bit vague as to which control is generating which lump of script 🙂
That’s not to say that I don’t like the web, of course 🙂
But today I spent a little bit of time playing with ASP.NET V3.5 Sp1 and its routing feature and it made perfect sense to me.
I have a request for some URL, I have some kind of ASP.NET handler that I want to route it to and there’s no reason to tie the handler of that request to anything physical on my site so why not just define a routing table that links these things together?
I had a bit of a play with it, wrote a couple of handlers, registered them on routes with default values and constraints and it all just worked exactly as I expected it to. To be honest, I found it a lot simpler than trying to author an .ASPX page because there was a lot less to understand – Route, IRouteHandler and IHttpHandler being fairly simple to get your head around.
Naturally, that’s because the content coming out of my handler was trivial – if I’d been doing some kind of fancy page then I’d have got stuck very quickly.
The one thing that seemed a little odd to me was that there is a Routing table of routes but there doesn’t seem to be the concept of “nesting” routes – not entirely sure how much that would/wouldn’t matter in reality.