[Zope3-dev] service names

sean.bowman@acm.org sean.bowman@acm.org
Sat, 25 Jan 2003 18:43:20 -0600 (CST)


hello,

In all the code I've seen in Z3, the second argument to getService is a
string literal.  This smells bad to me -- it seems to violate Once And
Only Once.  Would it be a good idea to use a constant instead of a string
literal?  For example::

  getService(context, defaultHubIdsName)

instead of::

  getService(context, "HubIds")

I am somewhat ambivalent about this since it's still possible to misspell
'defaultHubIdsName' and it's longer.

Sean