[Zope] Properties container: Descend from Folder or DTMLDocument?

Tres Seaver tseaver@palladion.com
Wed, 19 Jan 2000 17:08:57 -0600


Jim Washington <jwashin@vt.edu> wrote:

> I am working on a ZClasses thing that makes forms and automagically
> saves form data into the ZODB.  I am assuming the response record (After
> the 'submit' button is pressed) will be written once (e.g, a test or
> survey) and changed rarely or never, so it is proper to use the ZODB.
> 
> I do not want to use a DB product, since if you change the form, you
> need to modify the table, and that is not nice, either.
> 
> So, what I want is a thing that just has Properties I can add at
> runtime.
> 
> Should this new ZClass descend from Folder or DTMLDocument?  From the
> application's point of view, they are equivalently good, since both have
> Properties I can modify.  Technically, though, which would be better?

Any Zope class can have properties, although if you want to customize the
properties of each individual instance, you will need to pick up one of the two
you mention (or create a new one in Python which subclasses
PropertyManager.PropertyManager).  In that case, select between them based on
whether you want the item to be "folderish", that is, to allow adding other
objects via Zope.

-- 
=========================================================
Tres Seaver         tseaver@palladion.com    713-523-6582
Palladion Software  http://www.palladion.com