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

Paul Winkler pw_lists at slinkp.com
Tue Sep 28 12:48:45 EDT 2004


On Tue, Sep 28, 2004 at 12:28:48PM -0400, Tres Seaver wrote:
> Use case:  Site manager sets default content annotations
> 
>   Some products would like to create "template properties" on the
>   type information object, and use them to initialize (or provide
>   defaults for) the equivalent properties on content instances.
>   This is a simple form of schema-based programming, which would
>   make some kinds of customization simpler without the need to
>   create additional content classes (e.g., to add a special
>   "routing_number" field to a Document.)

Neat idea.  It occurs to me, you could do this today with
workflow.  e.g. something like: 

+-----------------+                         +-----+
| raw             | -----> initialize --->  | new |
| (initial state) |        (automatic)      +-----+
+-----------------+

Then write a script that adds your fields, and have it
called by "initialize".

A bit hacky, but hey, DCWorkflow is probably turing-complete ;-)

The proposal would be simpler in the common case
(e.g. the fields and default values are always the same).

-- 

Paul Winkler
http://www.slinkp.com


More information about the Zope-CMF mailing list