Re: [Zope-dev] Unique and Contant object IDs

2000-10-25 Thread Chris Withers

Toby Dickenson wrote:
 
 On 24 Oct 2000 15:14:24 GMT, [EMAIL PROTECTED] (Ty Sarna) wrote:
 
 Unfortunately there are a lot of things that Zope just can't do because
 there is no way to get a persistent "ticket" for an object that can be
 handed out to some external system, and then later redeemed for the
 (properly wrapped) object. Pathnames are not useful, because they don't
 last for the object's lifetime.
 
 How come? because you want the identity to remain unchanged even after
 the object is moved? or duplicated?

Yeah, I'd love an ID I could use to grab an object no matter how often
it was used.

Why wouldn't the following work though:

...in a class method...

self.theobject = theObject

...where theObject is something I want a reference to and self is a
persistent class...


cheers,

Chris

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




Re: [Zope-dev] Unique and Contant object IDs

2000-10-25 Thread Chris Withers

Toby Dickenson wrote:
 
  Yeah, I'd love an ID I could use to grab an object no matter how often
  it was used.
 
 I suspect you will have to build this yourself. Store a sufficiently random
 id inside your objects when they are created, and use a ZCatalog to index
 them.

blech! ;-)

  Why wouldn't the following work though:
 
  ...in a class method...
 
  self.theobject = theObject
 
  ...where theObject is something I want a reference to and self is a
  persistent class...
 
 theObject would need to be persistent too. This has a number of
 characteristics that I would class as problems, but may be exactly what you
 want:
 
 * theObject will have different acquisuition context when accessed through
 its main path, and through self.theobject. This means different:
* security

:-(

* absolute_url

...that'd probably behaev how I'd want

* configuration obtained through acquisition. What if theObject is
 CatalogAware?

CatalogAware is the work of the devil anyway ;-) ZPatterns ahs got to be
better for doing that kindof stuff ;-)

 * theObject isnt removed from the database when it is deleted from its
 folder; this other reference keeps it alive.

That, too, would be what I want... although I can think of other
situations where that would be bad... argh!

cheers,

Chris

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




Re: [Zope-dev] Unique and Contant object IDs

2000-10-25 Thread Itamar Shtull-Trauring

Chris Withers wrote:

  I suspect you will have to build this yourself. Store a sufficiently random
  id inside your objects when they are created, and use a ZCatalog to index
  them.
 
 blech! ;-)

This is the normal way to keep references to objects.  I asked Jim Fulton at
IPC8, and he basically said "don't use _p_oid", which means this is the only
way.  Of course, once the observer interface is more well developed you
won't need the Catalog part.

 CatalogAware is the work of the devil anyway ;-) ZPatterns ahs got to be
 better for doing that kindof stuff ;-)

Yup - no object_reindex() every time you change the object, no need to
inherit from anything.  You can  have automatic catalogging in any DataSkin
object trivially, with no change to your class.

-- 
Itamar S.T.  [EMAIL PROTECTED]
Fingerprint = D365 7BE8 B81E 2B18 6534  025E D0E7 92DB E441 411C

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




Re: [Zope-dev] Unique and Contant object IDs

2000-10-25 Thread Itamar Shtull-Trauring

Johan Carlsson wrote:

 Why are the _p_oid depriciated?

Not depreciated, just "don't use them."

-- 
Itamar S.T.  [EMAIL PROTECTED]
Fingerprint = D365 7BE8 B81E 2B18 6534  025E D0E7 92DB E441 411C

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




Re: [Zope-dev] Unique and Contant object IDs

2000-10-25 Thread Johan Carlsson




 Johan Carlsson wrote:
 
  Why are the _p_oid depriciated?
 
 Not depreciated, just "don't use them."

But I want too, why shouldn't I?
They solves my problems with mapping relational data to objects.

If I were to use my own random id generator I would need a global
registry for my UID. I really want that to be a feature in the ZODB.

//Johan




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




Re: [Zope-dev] Unique and Contant object IDs

2000-10-25 Thread Itamar Shtull-Trauring

Johan Carlsson wrote:

   Why are the _p_oid depriciated?
 
  Not depreciated, just "don't use them."
 
 But I want too, why shouldn't I?
 They solves my problems with mapping relational data to objects.

I would guess multiple databases can have the same oid's for their objects -
and Zope does support multiple databases.  Plus you're breaking
encapsulation, using an implementation detail of the ZODB for other
purposes.

-- 
Itamar S.T.  [EMAIL PROTECTED]
Fingerprint = D365 7BE8 B81E 2B18 6534  025E D0E7 92DB E441 411C

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




Re: [Zope-dev] Unique and Contant object IDs

2000-10-24 Thread Steve Waterbury

Ty Sarna wrote:

 Unfortunately there are a lot of things that Zope just can't do because
 there is no way to get a persistent "ticket" for an object that can be
 handed out to some external system, and then later redeemed for the
 (properly wrapped) object. Pathnames are not useful, because they don't
 last for the object's lifetime.

Hmmm ... what you describe sounds a lot like an ILU "string 
binding handle" -- see

http://www-db.stanford.edu/~testbed/ilu/ilu20doc/manual_1.html#SEC10

ILU does have a Python binding, and I've been thinking that ILU 
and Zope might have a lot of potential if used together ... it 
could make Zope "multi-lingual"  :^)  Has anyone thought of 
doing anything with the two together?  

Cheers,
-- Steve.

   oo _\o
\/\ \
  /
 oo _
"Sometime you're the windshield; sometime you're the bug."
- Knopfler

Stephen C. Waterbury   Component Technologies
Code 562, NASA/GSFC  and Radiation Effects Branch
Greenbelt, MD 20771   Engineering Web/Database Specialist
Tel: 301-286-7557  FAX:  301-286-1695
WWW:  http://misspiggy.gsfc.nasa.gov/people/waterbug.html
_

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




Re: [Zope-dev] Unique and Contant object IDs

2000-10-24 Thread Toby Dickenson

On 24 Oct 2000 15:14:24 GMT, [EMAIL PROTECTED] (Ty Sarna) wrote:

Unfortunately there are a lot of things that Zope just can't do because
there is no way to get a persistent "ticket" for an object that can be
handed out to some external system, and then later redeemed for the
(properly wrapped) object. Pathnames are not useful, because they don't
last for the object's lifetime.

How come? because you want the identity to remain unchanged even after
the object is moved? or duplicated?

Toby Dickenson
[EMAIL PROTECTED]

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