Ian Bicking: the old part of his blog

multi-dispatch

Typically what I think is called "components" in Django would be applications in Pylons. The analogous concept in TurboGears is a little vague; making it clearer was a motivation for using Paste Deploy configuration. Typically applications in Pylons are dispatched to be URL prefix, which is pretty easy to handle recursively. You can also set up a route that consumes a prefix, and leaves the rest in PATH_INFO for further dispatching. Actually doing that further dispatching with Routes is, I believe, non-trivial -- Routes currently is integrated with Pylons in such a way that it doesn't provide a simple WSGI application frontend. I doubt this is difficult to fix, and Ben has mentioned fixing it recently. I haven't generally had a need to do dispatching like that, so I'm a little unclear about the motivation.

Notably, Pylons applications are just WSGI applications, and (especially at the prefix level) can be used fairly opaquely -- that is, you don't have to know it is a Pylons application.

Well, maybe coming to your example, /{blogname}/archives/{year}/{month}/{title}/edit -- I would implement that with my own dispatcher on blogname, that instantiated the next application. I would probably do that as middleware, putting the blog name into the environment and expecting the Pylons application to pick that up. Thus the Pylons application would only implement one blog at a time, but the dispatcher would instantiate the application dynamically, turning that single instance into a farmable blog system.

Comment on Turbogearsandpylonscomment000
by Ian Bicking

Comments:

What do you mean, "Routes currently is integrated with Pylons in such a way that it doesn't provide a simple WSGI application frontend"? What would this look like?

# Mike Orr