Re: [Zope3-dev] ILocation vs IContained

2005-07-10 Thread Jim Fulton

Florent Guillaume wrote:
I'm having a hard time grasping the reasons why we have both  ILocation 
and IContained.


Overdesign on my part.


class IContained(ILocation):
Objects contained in containers.

But ILocation provides a __parent__ already, which seems to imply  that 
it's contained in it. No?


What use case makes us differentiate between the two?


The desire to distinguish ebtween objects that are container items
and objects that are simply located.  A good example is a site's
site manager.

Fred was correct when he said:

Fred Drake wrote:
 My own understanding is this:

 - ILocation refers to the __parent__/__name__ API, which allows these
 attributes to have None as a value.

 - IContained indicates that the object is actually contained in an
 IReadContainer, not just that it can be contained.

And others are correct when they point out that this is inconsistent
with Contaner implementing IContainer.

I'd be happy to see IContainer go away.  I don't think the distinction
between ILocation and IContainer is worth the complexity they cause.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



RE: [Zope3-dev] ILocation vs IContained

2005-07-10 Thread Roger Ineichen
Hi Jim

Behalf Of Jim Fulton
 Sent: Sunday, July 10, 2005 2:23 PM
 To: Florent Guillaume
 Cc: zope3-dev@zope.org
 Subject: Re: [Zope3-dev] ILocation vs IContained
 
 Florent Guillaume wrote:
  I'm having a hard time grasping the reasons why we have 
 both  ILocation 
  and IContained.
 
 Overdesign on my part.
 
[...]
 
 And others are correct when they point out that this is inconsistent
 with Contaner implementing IContainer.
 
 I'd be happy to see IContainer go away.  I don't think the distinction
 between ILocation and IContainer is worth the complexity they cause.

You mean IContained instead of IContainer. right?

Regards
Roger Ineichen

 Jim
 
 -- 
 Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
 CTO  (540) 361-1714http://www.python.org
 Zope Corporation http://www.zope.com   http://www.zope.org
 ___
 Zope3-dev mailing list
 Zope3-dev@zope.org
 Unsub: 
 http://mail.zope.org/mailman/options/zope3-dev/dev%40projekt01.ch
 
 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] ILocation vs IContained

2005-07-09 Thread Fred Drake
On 7/9/05, Roger Ineichen [EMAIL PROTECTED] wrote:
 No, I don't think so. Or at least if you create a object
 from it's factory e.g. in a addform this isn't true
 till the object get added to the container.

Well, I think we're not supposed to be creating objects that inherit
from Contained; I'm not sure what it's for.

The proxy situation is one which I find disturbing; we've seen the
issues about containment/location proxies in another thread.

I think I'm going to wait until Monday morning to see if Jim has any
clarification for us; I'd really like to hear his take on this,
because it sounds to me like it was all thrown together without enough
thought about how the location and containment ideas play together. 
(Not to say that Jim didn't think about it a lot, but the
documentation makes me want to know more about what he thought.)


  -Fred

-- 
Fred L. Drake, Jr.fdrake at gmail.com
Zope Corporation
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] ILocation vs IContained

2005-07-09 Thread Fred Drake
On 7/9/05, Roger Ineichen [EMAIL PROTECTED] wrote:
 Contained is the mixin class for the __parent__ and __name__
 attributes or not?
 
 And we used it as this. Otherwise you have to implement
 __parent__  and __name__ in your own classes again and again.
 
 See the commet in the class:
 Stupid mix-in that defines `__parent__` and `__name__` attributes

zope.app.location.Location that comment as well, and doesn't imply
IContained.  So the ambiguity screams loudly as to its presence.  :-(


  -Fred

-- 
Fred L. Drake, Jr.fdrake at gmail.com
Zope Corporation
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] ILocation vs IContained

2005-07-08 Thread Florent Guillaume
I'm having a hard time grasping the reasons why we have both  
ILocation and IContained.


class IContained(ILocation):
Objects contained in containers.

But ILocation provides a __parent__ already, which seems to imply  
that it's contained in it. No?


What use case makes us differentiate between the two?

Florent

--
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of RD
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]


___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com