[Zope-CMF] Re: [dev] RFC: Extensible propertysheet use cases
yuppie
y.2004_ at wcm-solutions.de
Wed Sep 29 16:40:27 EDT 2004
Hi Michel!
Michel Pelletier wrote:
> 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.
Two reasons why I would prefer a new class:
- The functions currently exposed in FactoryTypeInformation are mature
and fool save compared to the proposed PropertySheets machinery. If you
don't know exactly what you do, it is very likely that modifying the
schema after creating instances of that type screws up your data.
- FactoryTypeInformation is also used by Archetypes and CPSDocument.
These have their own schema machinery that's not compatible with the
PropertySheets machinery.
BTW: Against which CMF version is your patch? I tried it with HEAD, but
that didn't work.
Cheers,
Yuppie
More information about the Zope-CMF
mailing list