[Zope3-dev] changing IServiceService.getService signature
Jim Fulton
jim@zope.com
Mon, 15 Apr 2002 14:40:53 -0400
Gary Poster wrote:
>
> 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.
+1
--
Jim Fulton mailto:jim@zope.com Python Powered!
CTO (888) 344-4332 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org