[Zope-dev] PROPOSAL: Site objects

Evan Simpson evan@tokenexchange.com
Tue, 21 Sep 1999 12:21:06 -0500


This is exactly what I've been working on;  I call them 'SiteRoot' objects
:-)  Nowhere near done, and I'd love to collaborate.

----- Original Message -----
From: Jim Fulton <jim@digicool.com>
>
>   http://www.zope.org/Members/jim/SiteObjectProposal
>
> Comments?

I really like your ideas about absolute_url() and making the re-rooting a
method of Request objects.  What do you mean by 'Integrated Session
Management'?

Here's how I've approached it so far:

o All functionality lives in the SiteAccess Product
-- No patches to Zope source

o You may place a SiteRoot object in any folderish object.
-- Hijacks __bobo_traverse__ on the container
---- Munges Request values (PARENTS, SERVER_URL, SCRIPT_NAME) with SiteURL
property.
-- No need to change/replace a hierarchy container
-- Container doesn't have to be a vanilla Folder object

o PCGI and HTTP Requests will need to be affected in slightly different
ways.
-- PCGI may already be rewritten and/or vhosted
---- but you might want to manipulate further
-- HTTP will always be raw, and require rewriting and vhosting

o I haven't the faintest idea what should happen with FTP and monitor
access.  Probably nothing.

o Zope rewrite/vhost rules are handled independently, by AccessRule objects
-- You might want to rewrite URLs without multi-siting
---- AccessRules can do cool things like add default context to requests
without showing long URLs to the client
-- AccessRules can be complex, and may not correlate closely with
SiteRoot.SiteURLs
-- Manipulating AccessRules is a security risk on the level of adding
Products
---- How could customers be allowed to rewrite URLs leading to their own
content and nobody else's?
-- All AccessRules should be available to SiteAccess when it loads, without
poking around in storage
-- Thus: AccessRule objects should probably live in the Product, if that can
be managed

o Acquisition should pass upward through a SiteRoot, but not down through
another
-- Common content/methods will often be shared among sites
-- Only one SiteRoot is allowed in a namespace