[Zope-CMF] [dev] Actions and CMFSetup: naming conventions proposal
yuppie
y.2004_ at wcm-solutions.de
Tue Jul 13 17:53:00 EDT 2004
Hi!
The following ActionInformation attributes have many names, and CMFSetup
further adds up to the mess:
'id', 'title', 'action', 'condition' and 'permissions'
I propose to use consistent names throughout CMF, including DCWorkflow.
'id':
-----
CMFSetup uses 'action_id'. That might make sense in an XML file.
'title':
--------
The form 'editToolsActions.dtml' uses the label 'Name' and the dict
returned by 'getAction' has a 'name' key. DCWorkflow uses 'actbox_name'
internally and 'Name (formatted)' as label.
Proposal: Use always 'title', except of DCWorkflow's internal name.
ToDo: Add 'title' alias to 'getAction', change the labels.
'action':
---------
The 'getAction' dict uses 'url', DCWorkflow 'actbox_url' and the label
'URL (formatted)'. CMFSetup uses 'action_expr'.
Proposal: Use always 'url', except of internal names.
ToDo: Change the label in 'editToolsActions.dtml' and the CMFSetup
attributes.
'condition':
------------
'apcExport.xml' uses 'condition_expr'.
Proposal: Use always 'condition'.
ToDo: Change 'apcExport.xml'.
'permissions':
--------------
'apcExport.xml' uses 'permission'. 'editToolsActions.dtml' uses
'Permission'.
Proposal: Use always 'permissions', except in 'editToolsActions.dtml'.
ToDo: Change 'apcExport.xml'.
Modification: Be more explicit about the type.
----------------------------------------------
Expressions:
'url_expr', label 'URL (expression)'
'condition_expr', label 'Condition (expression)'
Formatted strings:
'url_formatted', label 'URL (formatted)'
'title_formatted', label 'Title (formatted)'
Any comments?
Cheers,
Yuppie
More information about the Zope-CMF
mailing list