[Zope-CMF] How to save extra data with CMF-object

Tres Seaver tseaver@palladion.com
Mon, 16 Jul 2001 11:48:24 -0400 (EDT)


On Mon, 16 Jul 2001, marc lindahl wrote:

> 
> 
> > From: Tres Seaver <tseaver@palladion.com>
> > 
> > PropertyManager is somewhat icky from the perspective of
> > maintainability:
> > 
> > - It is a "flat" namespace;  in fact, it stores properties in the
> > as normal Python attributes of the instance.
> 
> Am I confusing this with Property Sheets?

Yes.  PropertyManager objects (classic Zope folders, DTMLDocuments,
etc.) have a single, schema-free "propertysheet-like" interface
(the one exposed by the "Properties" tab).  Property Sheets are a
more general mechanism, which don't have this drawback.
 
> > - One can't look at a central location (e.g., the Python class,
> > or ZClass, or the type object) to determine the schema for all
> > objects of a given type.
> 
> ...but OTOH, some collections of objects need that
> variability... you can't always predetermine the schema, right?

My objections have to do with *maintainability* -- a collection
of objects with no common properties can't be managed as a whole;
everything is "one-off".

> Though one could specifically create other kinds of containers
> to hold random collections of stuff.  But then, for someone
> getting started, it increases development time since you then
> have to create interfaces, management, etc. etc. which is
> already there for Properties.... 

This discussion is about whether it is reasonable to exploit the
fact that PropertyManager is a base class of all the stock
content objects.  I would avoid exploiting it, because I dislike
the maintainability costs;  others might prefer to exploit it,
rather than write new content classes.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@digicool.com
Digital Creations     "Zope Dealers"       http://www.zope.org