abombss:Second, what are you doing that is so complicated?
Pushing the limits for fun and profit, of course!
abombss:I have found the default stuff to be very customizable, it feels a little hackish but the routing is very powerful for version 1 ctp.
It is great for a CTP, no doubt. I just want to make sure v2 CTP has my feedback. I don't like having to re-write stuff that was marked internal, so I want to call out places where I needed to do so. I agree with some of the hackishness, but it's great that it is possible to hack it - rather than hitting lots of brick walls.
The biggest issue I have is that I have to customize more than what I'd think I'd need to. For example, in one of my early attempts I had to create a custom route handler in order to call my subclass of MvcHandler which was overriding GetType (which means I had to implement my own type cache) to call my DI container for the type by string so that later my ControllerFactory could get the same type out of the DI container later. All of this, when what I really needed was for the controller factory to have the RouteData passed to it rather than a Type. Or for the MvcHandler to take a type resolution service. They've already stated they'd probably change this a tad, which is great, but I want to make sure and call out all the places where this happens (like Route and Defaults) so that they are aware a person ran into it outside campus (even if I'm only a few blocks away).
abombss:Lastly, why write routes in xml... I would rather slit my throat. Why not just write code to auto register routes based on conventions, like namespace or some attribute or something.
It doesn't need to be XML - I may be generating routes based on some DSL - but there are lots of reasons; Ability to alter routes without access to code. Ability for a plugin writer to upload a plugin and associate it entirely through some configuration (perhaps stored in a db) - in any CLR language. Disambiguation when you have lots of different people or groups contributing. Flexibility to go outside the conventions for exceptional cases. Actually, all the same reasons you'd want to put anything in configuration rather than code or convention might apply. I just happened to run into one of them.