[Zope3-dev] service definition naming conventions

Jim Fulton jim@zope.com
Mon, 15 Apr 2002 14:39:02 -0400


Gary Poster wrote:
> 
> For most services, I am using three interfaces: a generic interface, a
> placeless interface, and a placeful interface.  This is my naming convention,
> using the factory service as an example:
> 
> IFactoryService (generic interface for all factory services, used to create
> the service definition)
> IGlobalFactoryService (placeless subclass, file-system based)
> ILocalFactoryService (placeful subclass, OFS-based)
> 
> Similarly, that would be IRoleService, IGlobalRoleService, and
> ILocalRoleService...and so on.

Why do placeful and global services have different interfaces? I think
they shouldn't.

Maybe your tripping over the fact that a number of the existing service interfaces
are too big, including management, and well as query methods.

> Since, as I understand it, placeless ComponentArchitecture filesystem
> services should go in Zope.ComponentArchitecture, the first two interfaces go
> there, and the last one goes in Zope.App.OFS.Services.LocalFactoryService.

Again, I think this shouldn't apply to services.
 
> I'd like to propose using this naming convention for all upcoming services.
> 
> More controversially, I want to rename all services and service interfaces to
> follow this Global and Local naming convention. Thus (to present the biggest
> and most potentially upsetting change first), I might change
> Zope.ComponentArchitecture.Service.Service to
> Zope.ComponentArchitecture.GlobalServiceManager.GlobalServiceManager and
> Zope.App.OFS.ServiceManager.ServiceManager to
> Zope.App.OFS.LocalServiceManager.LocalServiceManager

OK, you are refering to classes, not interfaces. This is fine with me.
 
> I am using this naming convention now for my own work; if I get *positive*
> feedback on this idea for renaming current services then I'll proceed there
> in the latter half of the week.  I'm not necessarily expecting positive
> feedback, though. :-)

I'm OK with this naming convention for classes. I don't think it 
applies to interfaces.

Jim

--
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