[Zope3-Users] Re: object id / name / name within parent?

Stephan Richter srichter at cosmos.phy.tufts.edu
Mon Jan 10 08:34:09 EST 2005


On Monday 10 January 2005 08:22, Florent Guillaume wrote:
> > > The name is indeed comparable to Zope 2's id. Except that in Zope 2,
> > > both an object and its container know the id (which makes for redundant
> > > information that can get out of sync etc), whereas in Zope 3 the name
> > > is only stored with the object itself.
> >
> > Wrong. The container keeps the name, too. Containers are usually simple
> > mapping objects (like a dict). The fact that the name is also stored on
> > the object is an extra feature that you really shouldn't know about
>
> Ok sorry for the confusion. I was actually mixing up container/object
> here, mistake further compounded by other stuff. I remember that
> initially in Z3 only the container stored the name. Then optimizations
> kicked in, and the model for object reference changed a bit I guess.

Actually, we got very tired of context wrappers anywhere. They were ugly and 
ended up being everywhere, so we decided to store the name and parent on the 
object direcly. Note that objects that do not support ILocation can still use 
something similar to ContextWrapper to get a location.


Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training


More information about the Zope3-users mailing list