[Zope3-dev] Service names Proposal

Steve Alexander steve@cat-box.net
Tue, 04 Mar 2003 23:12:49 +0200


Here's a summary of the discussion of service names.
At the end of this email is my own proposal for naming the services. 
Skip to that if you're not bothered about a recap of the discussion so far.

Interested parties, please reply briefly to the proposal indicating your
approval, disapproval or ambivalence.


---- the recap ----

The easy ones:

    HubIds, Roles, Permissions, Adapters,
    Interfaces, Utilities, Skins, Views, Resources,
    Factories


The service that applications use to send out events to any other
components that might be subscribed to receive such events.

   EventDispatch        dispatch(SomeEvent)
   EventDispatching

   +1 from various people,
   -1 from Gary, on the grounds that he feels 'dispatch' implies someone
      is on the receiving end, whereas with 'publish' this might not
      necessarily hold.

   EventPublication
   EventPublishing

   Most people seem happy with these.


The service that records errors that have reached the publisher.

   ErrorReporting
   ErrorLogging
   ErrorCollection


There are four services that don't fit into the plural-noun pattern of the
'easy service names' at the top of this email.

There are various options of ways to spell them. I'd quite like them to
be spelled in a consistent grammatical way.

Nouns derived from verbs, for providing the means to do something

     Authentication, EventSubscription, EventPublication, ErrorCollection
                                        EventDispatch

or perhaps the participal form of the verb

     Authenticating, EventSubscribing, EventPublishing, ErrorReporting
                                                        ErrorLogging

or perhaps the infinitive of the verb

     Authenticate, SubscribeEvents, PublishEvents, ReportErrors
                                                   LogErrors

Godefroid was in favour of some kind of grammatical consistency, on the
grounds that it helps new developers build a mental model of the framework.


Or, we could decide that grammatical consistency isn't so important 
after all, and go for the best of the bunch. My own selection of the 
best is:

     Authentication, EventSubscription, EventDispatch, ErrorLogging

These are the names that I feel best reflect what services the services
provide to the code that uses them.

I prefer EventDispatch over EventPublication because it is shorter, and
because I think users of the service want to dispatch the event to that
service. The service itself does the publishing.
By analogy with something in the real world, if I write a book, I 
dispatch the finished manuscript to my publisher, who does the actual 
publishing. My publisher receives mail, and so provides me with the 
means to dispatch manuscript to them.
However, I'm also happy with EventPublication, so Gary, please speak up 
if you're very much against EventDispatch.


---- proposal --------8<-----

So, here's my proposal: clarity is more important than consistency.


     Authentication, EventSubscription, EventDispatch, ErrorLogging

--
Steve Alexander