[xwiki-devs] [Proposal] Naming convention for new wiki macros
Hi devs, For the new messageSender macro [1][2], I chose the name using the "attachmentSelector" macro as a template: "<object><personified-action>" Vincent did not really like the "messageSender" name and proposed "message", "sendMessage" or "userMessage". Since AFAIK we don`t currently have a naming convention for wiki macro names, I`d like to propose that we stick to the patterns: 1) "<object><personified-action>" (attachmentSelector, messageSender) for action-oriented macros and 2) "<object(s)>" (documents, spaces, activity) for display-oriented macros For 2), it's pretty clear, but for 1), I personally prefer "<object><personified-action>" since overall it is a noun and, in english, the phrase "messageSender macro" sounds better to me than "sendMessage macro". Also, I think that the main action of the action-oriented macro should be reflected in its name. I`d like your opinion on the matter and also new proposals if you have any. Here's my +1 for 1) and 2). Thanks, Eduard ---------- [1] http://xwiki.markmail.org/thread/mxpkpqfplbznfgbd [2] http://jira.xwiki.org/browse/XWIKI-7679
On 05/29/2012 09:20 AM, Eduard Moraru wrote:
Hi devs,
For the new messageSender macro [1][2], I chose the name using the "attachmentSelector" macro as a template:"<object><personified-action>"
Vincent did not really like the "messageSender" name and proposed "message", "sendMessage" or "userMessage".
Since AFAIK we don`t currently have a naming convention for wiki macro names, I`d like to propose that we stick to the patterns: 1) "<object><personified-action>" (attachmentSelector, messageSender) for action-oriented macros and 2) "<object(s)>" (documents, spaces, activity) for display-oriented macros
For 2), it's pretty clear, but for 1), I personally prefer "<object><personified-action>" since overall it is a noun and, in english, the phrase "messageSender macro" sounds better to me than "sendMessage macro". Also, I think that the main action of the action-oriented macro should be reflected in its name.
I`d like your opinion on the matter and also new proposals if you have any.
Here's my +1 for 1) and 2).
+1 as well. I don't agree that the message sender macro should be called "message" or "userMessage", since without knowing what it does, I'd assume that it displays a message to the user, and seeing a textarea coming out of it I'd be surprised and wouldn't know what to do. "sendMessage" is also wrong IMO, since the present form of the verb suggests that it instantly sends a message, not that it allows me to send a message if and when I want to. -- Sergiu Dumitriu http://purl.org/net/sergiu/
On Tue, May 29, 2012 at 4:38 PM, Sergiu Dumitriu <[email protected]> wrote:
On 05/29/2012 09:20 AM, Eduard Moraru wrote:
Hi devs,
For the new messageSender macro [1][2], I chose the name using the "attachmentSelector" macro as a template:"<object><personified-action>"
Vincent did not really like the "messageSender" name and proposed "message", "sendMessage" or "userMessage".
Since AFAIK we don`t currently have a naming convention for wiki macro names, I`d like to propose that we stick to the patterns: 1) "<object><personified-action>" (attachmentSelector, messageSender) for action-oriented macros and 2) "<object(s)>" (documents, spaces, activity) for display-oriented macros
For 2), it's pretty clear, but for 1), I personally prefer "<object><personified-action>" since overall it is a noun and, in english, the phrase "messageSender macro" sounds better to me than "sendMessage macro". Also, I think that the main action of the action-oriented macro should be reflected in its name.
I`d like your opinion on the matter and also new proposals if you have any.
Here's my +1 for 1) and 2).
+1 as well.
I don't agree that the message sender macro should be called "message" or "userMessage", since without knowing what it does, I'd assume that it displays a message to the user, and seeing a textarea coming out of it I'd be surprised and wouldn't know what to do.
"sendMessage" is also wrong IMO, since the present form of the verb suggests that it instantly sends a message, not that it allows me to send a message if and when I want to.
Good point. +1 for messageSender Thanks, Marius
-- Sergiu Dumitriu http://purl.org/net/sergiu/
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
+1 On Tue, May 29, 2012 at 3:20 PM, Eduard Moraru <[email protected]> wrote:
Hi devs,
For the new messageSender macro [1][2], I chose the name using the "attachmentSelector" macro as a template: "<object><personified-action>"
Vincent did not really like the "messageSender" name and proposed "message", "sendMessage" or "userMessage".
Since AFAIK we don`t currently have a naming convention for wiki macro names, I`d like to propose that we stick to the patterns: 1) "<object><personified-action>" (attachmentSelector, messageSender) for action-oriented macros and 2) "<object(s)>" (documents, spaces, activity) for display-oriented macros
For 2), it's pretty clear, but for 1), I personally prefer "<object><personified-action>" since overall it is a noun and, in english, the phrase "messageSender macro" sounds better to me than "sendMessage macro". Also, I think that the main action of the action-oriented macro should be reflected in its name.
I`d like your opinion on the matter and also new proposals if you have any.
Here's my +1 for 1) and 2).
Thanks, Eduard
---------- [1] http://xwiki.markmail.org/thread/mxpkpqfplbznfgbd [2] http://jira.xwiki.org/browse/XWIKI-7679 _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On May 29, 2012, at 3:20 PM, Eduard Moraru wrote:
Hi devs,
For the new messageSender macro [1][2], I chose the name using the "attachmentSelector" macro as a template: "<object><personified-action>"
Vincent did not really like the "messageSender" name and proposed "message", "sendMessage" or "userMessage".
Since AFAIK we don`t currently have a naming convention for wiki macro
It's not related to wiki macros but to macros in general. It's true that we don't have an official rule. However we've been following a strategy. So far our "unofficial" rules has been to always try to find the shortest possible name for all our macros.
names, I`d like to propose that we stick to the patterns: 1) "<object><personified-action>" (attachmentSelector, messageSender) for action-oriented macros and 2) "<object(s)>" (documents, spaces, activity) for display-oriented macros
For 2), it's pretty clear, but for 1), I personally prefer "<object><personified-action>" since overall it is a noun and, in english, the phrase "messageSender macro" sounds better to me than "sendMessage macro". Also, I think that the main action of the action-oriented macro should be reflected in its name.
I`d like your opinion on the matter and also new proposals if you have any.
Here's my +1 for 1) and 2).
So should we rename all our script macros? No of course. e.g. {{velocity}} --> {{velocityExecutor}} or {{velocityExecution}} It's not fully incompatible with your proposal though; we just need to make it a bit more generic. So we could have: 1') <object> whenever possible (not just display macros) 2') <object><Qualifier> otherwise. I'm not sure about what qualifier we should use and whether we should make it a rule or not. for the message sending macro we could have "Send", "Sending", "Sender". Now I'd personally prefer <verb><object> for 2') I think. I tend to prefer "sendMessage" which IMO is simpler and more obvious to read in English than "messageSender". If "send" is not the correct verb (see Eddy's reply on this) then "postMessage" or "composeMessage" are nicer IMO than messagePoster or messageComposer. Thanks -Vincent
participants (5)
-
Eduard Moraru -
Marius Dumitru Florea -
Sergiu Dumitriu -
Thomas Mortagne -
Vincent Massol