"Give a rope to people, they will hang themselves up with it" - anonymous
I have meant to write this comment weeks before but been busy and I hope it is not too late. Just fresh from finding a big performance bottleneck which turned out to be due to AttributeRouting, I think it is time to say a few words.
Routing is an area which needs improvement but the direction taken by adopting AttributeRouting is the opposite of what is needed. So instead of decentralising routes and hide the valuable information in string tokens, we need to move towards not only centralising the routing (as it is a strategic application-wide decision) but to allow the routes to be defined with zero configuration by the resources. And also the relationships to be defined naturally by the resources. So I believe it is definitely more like Darrel Miller's ApiRouter rather than AttributeRouting.
Another aspect is the hierarchical routing which also defines the relationships naturally with code rather than arbitrary string tokens. This allows hypermedia to be derived from the resource itself rather than to hand-coded in the resource. Reality is Web APIs are hierarchical while routing adopted from MVC is very flat. One of the problems is the linear search through the routes definitely does not scale.
I can do a proof of concept to show what I mean - if you think it is useful.
↧