Chris Withers wrote:
> 
> Hi,
> 
> I hope this is a stupid question but why does ZCatalog use the URL of an
> object to uniquely identify it?

Because it's unique.
 
> Why not just use a reference to the object?

How do you define that?  If you mean reference in the strictly python
sense, then I guess you're thinking about some kind of name or
dictionary key in the catalog that is directly assigned the value of the
observed object?  This sorta gets back to the symbolic link vs. hard
link analogies brought up in the past.  Both have their dificulties, you
cannot, for example, have a reference across databases, while you can
map the physical path.  Using a string like this could also allow you to
quickly modify the catalog to index external resources.

> Persistent object
> identifiers must exist for the ZODB so why not use them instead?

They change, I believe, over the revisions of the objects; and also this
is a very low level identifier.  I'm not certain.  I think this
attribute is _p_oid.
 
> cheers,
> 
> Chris
> 
> PS: This would solve all the problems with ZCatalogs and virtually
> hosted sites...

So would a solid traversal interface that understood virtual hosting in
Zope.

> I think the traversal interface is needed for other
> reasons but it should remove ZCatalog from the list of things that need
> it... not that I've just been bitten by this or anything ;-)

I understand, but I think most of the biting was due to bugs than a flaw
in the model.

-- 

-Michel Pelletier

http://www.zope.org/Members/michel/MyWiki

Visit WikiCentral for the latest Zen:

http://www.zope.org/Members/WikiCentral

_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to