[Zope3-dev] EventService, references, and subscription semantics

Steve Alexander steve@cat-box.net
Tue, 26 Feb 2002 15:49:44 +0000


Phillip J. Eby wrote:
>
>>
>> I don't think this covers having a manager in an object's context 
>> provide its reference.
> 
> 
> Such a facility can be encapsulated in an adapter that provides 
> 'IReferenceable'; it doesn't need to be (and IMHO shouldn't be) in the 
> core usage pattern.  An object which wants an 'IReference' should be 
> insulated as much as possible from the mechanics of *how* to get it.  
> The how is a policy, and therefore should be *behind* an interface, not 
> in front of it, if you see what I mean.

I quite agree. What I meant was that your proposal did not seem to have 
the scope to address in particular Shane's example of an IPrincipal 
object that is provided from an LDAPUserSource.

Expanding the scope a bit, I think that one particular implementation of 
IReferenceable would need an IReferenceGeneratorForContext (rename as 
you like) that it would get as a utility from the object's context.

--
Steve Alexander