[Zope-CMF] Re: [dev] Actions and CMFSetup: naming conventions proposal

yuppie y.2004_ at wcm-solutions.de
Thu Jul 15 05:19:53 EDT 2004


Dieter Maurer wrote:
> yuppie wrote at 2004-7-13 23:53 +0200:
> 
>>...
>>'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.
> 
> 
> While this information is often used as an URL, it can well
> be used for different purposes (e.g. as an "object" specification
> for high end UI controls).
> 
> We have such a use and a colleague was confused by the name "url"
> returned in the action info.
> 
> Maybe, we find a more general name. "action" were not too bad, if
> the complete thing were not called "action", too.

'url' is currently returned by listFilteredActionsFor. As you say, 
'action' is already used for the complete thing. I see your point that 
this field isn't always used for URLs. But I doubt it would be a good 
idea to introduce another term.

> Moreover, the information in an "ActionInformation" and the
> action info dictionary (returned by "listFilteredActionsFor")
> is related but not equal. Maybe, we should reflect this in the
> names. In this respect, the names used by "CMFSetup" are well chosen:
> "action_expr" is the expression that when evaluated results in the
> "action" (or "url" or whatever good name we find).
> In my view, it is useful to use related but different names,
> when the things are related but different.

I count this as a vote for the modification in my proposal:

> 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)'


If there are no objections, I'll make the changes with this modification.

(Regarding CMFSetup I'll send another mail to the list before changing 
anything.)


Cheers, Yuppie



More information about the Zope-CMF mailing list