[Zope3-dev] traversing path from scratch

Shane Hathaway shane@zope.com
Tue, 07 May 2002 15:36:39 -0400


R. David Murray wrote:
> On Tue, 7 May 2002, Shane Hathaway wrote:
> 
>>>(I'm assuming here that there's only supposed to be a single root object
>>>for a zope instance. If there are several root objects, then I guess
>>>that each root object will offer its own placeful traversal service, and
>>>there will need to be another means of getting the root objects. Someone
>>>say yagni please!)
>>
>>yagni. ;-)  Having only one root is easier to think about.  We've never
>>had any reason to have more than one.
> 
> 
> The potential use-case for multiple roots that I came up with
> while talking on IRC with Gary was: virtual hosting.  You might
> want separate roots, so that the hierarchies for the different
> sites could not interfere with each other.  This is obviously
> not the only way to do it, but it feels like it has a certain
> kind of elegance and is worth at least thinking about.

Yes, although if you set security policies and configure services in the 
"true" root, you want them to apply to all "virtual" roots as well.  So 
the context wrapper chain should include the "true" root.

You know, today we have "virtual host monster" and "access rules", and 
"site access", but all of them are sort of an abstraction based on the 
simple need of achieving virtual hosting.  Shouldn't the pattern instead 
be to add a "virtual host folder" using the ZMI, then have everything 
Just Work?  The virtual host folder could take care of the URL 
translation business.  That's what I'd like to see in Zope 3.

Shane