On Jan 17, 2008, at 12:21 PM, Mike Orr wrote:

Good idea, active and passive routes are easy to explain.  "Active"
means participates in
matching; "passive" means the route does nothing unless you invoke it for
generation.

Should we change .connect to .active or is that too radical?

I think .connect is still fine.

url_for is currently a function that does several other things in addition to generating the route. E.g., adding the application prefix, doing route memory. It calls m.generate() to do the generation. I'm investigating whether it would be feasable to make 'm' and 'url_for' the same object... but it would mean putting all this extra stuff into 'm' that I'm not sure if it belongs there.

It probably doesn't need to be. Though as an implementation detail, and a way to avoid SOP's in Routes, if the url_for object was made by the RouteMap, then the RoutesMiddleware could put the current url_for object into environ. No SOP needed then, and a framework can make a global SOP to the url_for if it wants to (which Pylons likely would).

I wasn't planning to support the other dict methods, but maybe we could.
If we just say that url_for.routes is a dict of routes by name (as I
was planning
to implement), that would do the same. Otherwise if we offered .items(), what
would the values be?

The values would be the Route objects, assuming there is still route objects in Routes 2. I had generally assumed there would be, since there needs to be something to hold onto the various options for each connected route, and how to generate it.

Cheers,
Ben

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to