[Zope-CMF] [dev] enhancing Actions: a rough proposal
yuppie
y.2004_ at wcm-solutions.de
Sun Nov 21 15:14:33 EST 2004
Hi!
Here is a rough proposal for enhancing the Actions machinery. Comments
are welcome!
Goals:
- making TTW editing of Actions easier
- making extending and replacing Actions easier
- reducing the need to define redundant type Actions
- simplifying the Actions machinery
Idea:
The ActionsTool becomes an ordered folder subclass that contains
ActionCategory objects.
ActionCategories are OrderedFolder based objects that contain Action
objects.
Actions are SimpleItemWithProperties based objects.
Tools are no longer Action providers. Products add their Actions to the
ActionsTool like they add their skin layers to the SkinsTool.
Type Actions are no longer defined in the TypesTool. Using Method
Aliases, one Action defined in the ActionsTool can be used for all types
or a subset.
CMFActionIcons becomes obsolete. The consolidation of type Actions makes
the post-processing of Actions useless. Icons can be defined in the
Action objects themselves. Having all Actions of a category in one
place, 'Priority' becomes useless. They can be ordered in their container.
Unresolved Issues:
- Defining which Actions belong to which types:
I tested it with conditions (e.g. "python: folder is not object" or
"python:object.getPortalTypeName() in ('File', 'Image')"), but maybe we
need a solution based on marker interfaces.
- Workflow Actions:
No idea how they could benefit from the new machinery. If we don't
change them, CMFActionIcons doesn't become obsolete.
Any thoughts?
Cheers,
Yuppie
More information about the Zope-CMF
mailing list