[eluser]Unknown[/eluser]
I have been working on a project using Pylons (MVC for Python). I think they do a great job of routing.
Here's an example:
Code:
map.connect('article', 'article/:author/:id.:format', controller='article', action='view',
id='all', format='html',
requirements=dict(id='\d+', format='(rss|html|xml)'))
then in my views or controllers i never have to specify the true url ("/article/__author__/__id__"), but instead can do something like:
Code:
h.url_for('article', author='me', id='3')
using the web helpers util.
Basically, has anyone come up with a solution to use alias' for routes. It becomes more portable and receptive to change if something has to change all my links simply point to an alias.