[Zope-CMF] Re: [dev] RFC: Extensible propertysheet use cases
Tres Seaver
tseaver at zope.com
Fri Oct 1 15:21:18 EDT 2004
Dieter Maurer wrote:
> yuppie wrote at 2004-10-1 16:50 +0200:
>
>>...
>>I'm aware of these two use cases:
>>
>>
>>1.) Looking up a single property of a single Action.
>>
>>So far I only needed that for target URLs.
>
>
> But I posted lots of examples where more properties
> are relevant (e.g. HTTP "title", "target", "class", "on<event>";
> "object" attributes; arguments for scripts that create the UI
> action representation).
>
>
>>2.) Generating HTML links (or something similar) in a loop.
>>
>>So far I've only seen loops with hardcoded properties. Either we have to
>>be sure these properties exist or we have to test if they exist.
>>
>>Given that, we have to define a schema, at least in our mind. Useful
>>properties have to follow that schema.
>
>
> I think, I am starting to understand...
>
> Usually, all actions belonging to a single category assume
> the same schema. Several categories may share the same schema.
>
> Some properties in the schema might be optional.
> The UI code handling the category knows about this (and must take
> care of it).
>
>
>>If we want to share code with other people, it's useful to use the same
>>schema. Products can ship with Actions that include properties like
>>'description' or 'target_viewport' and other Products will know how to
>>use them. (I don't say that a standard schema or a limited set of
>>standards can cover all use cases, but most of them.)
>
>
> I view standardization (and in particular schemas) as a multi level
> approach: there are standards on several levels:
>
> * CMF standards
>
> * Plone standards
>
> * Company standards
>
> * Workgroup standards
>
> * Project standards
>
> * Individual decisions (i.e. no standard at all)
>
>
> I my view, we should allow CMF users to define their standards
> below that of the CMF standards.
> Making "Actions" "PropertyManager"s allows this (although it is by
> far not the most optimal solution).
>
>
>>
>>I'm not sure if you have other use cases in mind or if you think the
>>PropertyManager machinery is the right tool for the use cases I mentioned.
>
>
> It is a feasible poor man's solution.
>
>
> I am a strong favorite of KISS (Keep It Stupid Simple)
> and XP: use poor man's solutions until you precisely understand
> what the high end solution requires and you are sure you need it;
> evolve incrementally.
>
>
> "PropertySheet"s (true ones, not sheets that keep all
> attributes in the main object) or XML-namespaces were standard approaches
> to implement the next evolutionary step.
I would actually prefer non-virtaul propertysheets for *all* these use
cases, myself. This avoids namespace issues, and makes it clear that
the values are true "annotations", outside the scope of the "mainline"
functionality of the typeinfo / actioninfo objects.
E.g.:
<div tal:content="action/propertysheets/plone_actions/description" />
would make it clear that the values were *not* part of the normal
attribute set of the action.
Tres.
--
===============================================================
Tres Seaver tseaver at zope.com
Zope Corporation "Zope Dealers" http://www.zope.com
More information about the Zope-CMF
mailing list