[Zope3-dev] Re: Properties?

Jim Fulton jim@zope.com
Mon, 12 May 2003 11:44:38 -0400


Paul Winkler wrote:
> On Mon, May 12, 2003 at 10:37:07AM -0400, Jim Fulton wrote:
> 
>>Zope 2 has a simple mechanism for extending the schema of many
>>standard objects, especially folders, with properties.  Properties
>>defined on folders and other objects provide additional attributes.
>>This makes properties easy to access.  This model has provided a
>>number of advantages:
>>
>>- It has enabled the use of folders and documents as one-off
>>  isntances.
>>
>>- It, together with acquisition, has made it easy to define and share
>>  simple variables/configuration data.
>>
>>I think that this model has been pretty sucessful.
> 
> 
> yes, for the most part.  it's certainly useful. 
> Folder properties are often used for
> configuration - see e.g. the skins tool in zope 2 CMF.
> 
> But that leads me to a problem I have with this model.
> You can't back up, or sync to another zope, your properties-
> based configuration independently of the ENTIRE folder contents. 
> This is very inconvenient, and it just smells wrong. To take a 
> real-world example: on a CMF site i maintain, every time the company
> adds a new customer they create a new skin path. We'd really
> like to be able to sync the new skin paths to a production server
> without syncing the entire skins tree, which often contains 
> stuff that's in development and not completely working yet.
> Since we can't do that, we have to duplicate the developement
> skin paths on the production server by hand. This process is
> error-prone.
> 
> I've even thought of addign a "sync properties only" feature
> to zsyncer, but i have no idea how i'd implement it.
> It would probably be very hacky.
> 
> What if instead we had properties stored in independent objects
> within the folder?  Maybe there could be a PropertyHolder 
> class, and if you ask a folder for its properties, 
> it acquires them from all PropertyHolders that it contains.
> 
> hm. problem with this model: what if multiple PropertyHolders are
> instantiated in a folder and define a property with the same name? 
> Yuck.  So maybe we'd have to have a "1 PropertyHolder per
> folder" rule? similar to the use of acl_users?

I should have noted that I've been thinking of defining a site
properties service.  This would be used for site configuration
parameters. It would be a separate object that could be synchromized
independently.

I see sontent properties to be more about one-off instances that about
site configuration.  It might be, though, that people will prototype
with regular proprties and then later turn some of these into site
properties.

Just brainstorming. :)

Jim

-- 
Jim Fulton           mailto:jim@zope.com       Python Powered!
CTO                  (703) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org