[Zope3-dev] changing IServiceService.getService signature

Gary Poster garyposter@earthlink.net
Mon, 15 Apr 2002 09:12:21 -0400


Zope.ComponentArchitecture.IServiceService.IServiceService.getService 
currently has this signature: (context, name).  This is apparently 
unnecessary.  The getService *hook* needs the context, but the actual service 
managers do not. Moreover (and this is the crux of the issue), placeful 
services will often need to get their parent services without access to a 
context other than their own.

I am building a few placeful services and would like to make this change.  If 
I don't hear any dissent today then I'll proceed.

One of these should be chosen so that placeful services can get their
contextually higher service:

 * remove context from IServiceService.getService:
     IServiceService.getService(name)

 * make context explicitly optional:
     IServiceService.getService(name, context=None)

I am in favor of the first option.  If you can't count on having context
then it seems pointless to occasionally send it and possibly react to it.
Again, the hookable ComponentArchitecture method will still require context:

 getService(context, name)

and thus the service manager will in fact be placeful.

Gary