GSOC idea discussion: Merging object dispatch with Routes 2 middleware.

0 views
Skip to first unread message

Hao Lian

unread,
Mar 21, 2009, 12:06:09 PM3/21/09
to TurboGears Trunk
Hi! I'd be interested in working on the object dispatch + Routes 2
idea for GSOC 2009. I have a few questions:

* Routes 2 looks like it's in the early stages of development without
much documentation yet [1]. Should my application also include
integration with Routes 1? Or perhaps start integration with Routes
1 first and then move it to Routes 2 as part of a later stage?

[1]: http://wiki.pylonshq.com/display/routes/Home

* Would this be a good implementation strategy?: Pick a time before
the application is initialized to walk through the object tree
starting at RootController. At each controller, get a list of
@exposed methods and create Route rules for each of them. And keep
repeating downward in the tree until there are no more controllers
left. I've only been able to quickly look through the object
dispatch code, so this is definitely a rough sketch.

And this would happen only once at some pre-specified time rather
than call time, as the Ideas page mentions, and should provide a
performance boost for large applications.

Thanks for any input!
Hao Lian,
Computer Science at Princeton University.

Mark Ramm

unread,
Mar 21, 2009, 8:34:30 PM3/21/09
to turbogea...@googlegroups.com, Ben Bangert
This would be a great project. I do think it might make sense to
work with Routes 1 rather than Routes 2, or to push forward a more
limited Routes 2 quickly so that we can integrate with that. Ben
Bangert from the Pylons project would be able to help us sort this one
out.

One quirk in the process would be the lookup methods, which would
still require some manner of traditoinal object dispatch once they
have been hit, since they dynamically generate objects on which
dispatch will happen, and that can't happen once at startup. But I
think the solution here would likely be to just create rules for the
lookup methods, and them do dispatch as we do now in that one case.

--Mark Ramm
--
Mark Ramm-Christensen
email: mark at compoundthinking dot com
blog: www.compoundthinking.com/blog
Reply all
Reply to author
Forward
0 new messages