[Zope-CMF] Re: [dev] RFC: Extensible propertysheet use cases

Michel Pelletier michel at dialnetwork.com
Wed Sep 29 14:51:42 EDT 2004


On Wed, 2004-09-29 at 07:11, yuppie wrote: 
> Florent Guillaume wrote:
> 
> >>Use case:  Site manager sets default content annotations
> >>[...] 
> > 
> > I believe this is best dealt with another specific TypeInformation
> > subclass, that has a schema setting and initializes its object as it
> > wishes.
> > 
> > (That's actually what we do in CPS, using our FlexibleTypeInformation.)
> 
> +1
> 
> A registry for TypeInformation classes would be nice. This way products 
> like CPSDocument would not have to patch the Types Tool.

While I usually like the theory of a new class I have one objection on a
practical basis.  All PropertyManagers (including existing portal types)
already have the necessary data model and guts to do this.  Making a new
subclass prevents one from putting instance properties on existing
portal types, even thought they fully support the functionality already.

If this "feature" required actual new code than I would say go with a
subclass, but a subclass in this case would not change the underlying
class functionality or data model at all, save for slightly tweaking one
template (properties.dtml) to point to the property sheets managment
interface (which is what my patch does).

There is only one minor backwards compatibility problem with putting it
on the same class, people who were using property sheets on types before
for some other reason (highly unlikely) will end up getting those sheets
copied into new instances.

-Michel



More information about the Zope-CMF mailing list