Kevin Dangoor wrote:
> Hi Diwaker,
> 
> I don't have any plans for that at the moment. I'd be interested in
> knowing what advantage using Routes would have over the CherryPy way.
> CherryPy's URL handling mechanisms are more powerful and flexible than
> people general seem to credit it for.

There's a couple things Routes can do that CherryPy can't really do.
Unless, I suppose, you use a default method right up front, then do your
own parsing.  Which is to say, you have an ad hoc routes matching.

Routes can match things at different points in the URL path, e.g., match
a variable length string at the beginning of the path, and a specific
string at the end.  Generally speaking, it matches the complete path at
once, so there's lots of patterns that CherryPy doesn't really support,
because you can only match one segment of a path in CherryPy.  Unless,
of course, you use an ad hoc pattern.  Lastly, given a parsed path
(which in CherryPy would probably mean a specific Python method) Routes
can determine how you'd construct a path to get there.

Oh, and I guess finally, you never have to change objects to attach
other objects, which decreases the localization of the code (since
parent objects must know about their children).


-- 
Ian Bicking  |  [EMAIL PROTECTED]  |  http://blog.ianbicking.org

Reply via email to