[Zope3-dev] Re: Properties?

Martijn Faassen faassen@vet.uu.nl
Tue, 13 May 2003 15:52:13 +0200


Jim Fulton wrote:
[snip]
> 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.

But how would you use such a one-off instance that's not site-configuration?
If you use them from view code anyway, then I'd say go with site configuration
directly.

In Zope 2, content-space properties are more useful as they're easily
acquired. Some other code (view code, in particular, I suspect) picks up these 
properties and changes behavior based on it. Something like 'background color' 
would be an example of this.

There's an overlap with metadata, so I'm not sure whether a separate
concept is needed -- it could just be some other metadata schema attached
to Folders.

Another use case would be the case of dynamic content. A page template or
a Python function needs to be configurable in some simple way, so that
people can tweak its behavior without having to change the code completely.
A property could be used here, but I'd question whether it would need
to be on the folder at all -- why not on the dynamic content itself?
You could argue it could be on the folder as you're building a larger
application consisting of multiple page templates and python scripts, but
then you should be moving to software space anyway, and not use dynamic content
at all.

Regards,

Martijn