[Zope] - USING THE ZOPE OBJECT DATABASE

Theodore Patrick tpatrick@IndigoNetworks.com
Mon, 28 Dec 1998 10:35:36 -0600


Ok, I have been reading on Object storage and manipulation in Python and
there has been a number of threads about attaching databases.

WHY?

ZOPE IS A DATABASE! If I am not mistaken! (no flames yet...read on)

In traditional object storage you create objects(folders in Zope) with
properties. Then refer to them.
______________________________

HERE IS MY QUESTION(Q:) AND POINT(P:) 

Q:CAN ZOPE STORE DATA AS PROPERTIES OF A FOLDER?
Q:CAN THIS HAPPEN DYNAMICALLY? (a.Create objects b.Store Form data to
objects c.Refer to Objects)
P:IF YES: THEN YOU DO NOT NEED A DATABASE(in most/some cases-Depending on
the APP)!
______________________________

SCENARIO
   
    1. User Logs on to a site made of ZOPE.
    2. User fills out form full of data on the user. FORM
DATA=(username=monty,dog=rover,shoes=yes,picture=me.gif)
    3. Zope creates a new user record object --> user_recs.monty
    4. Zope attaches all of the form data to the object as properties so
that:
        a. user_recs.monty.dog = rover
        b. user_recs.monty.shoes = yes
        a. user_recs.monty.picture = me.gif
    5. To GET data simply refer to object property and Data Appears. DING!

______________________________

Objects in Zope  vs.  Objects in Python ??? (OBJECT CREATION, PROPERTY
ALLOCATION, AND PERSISTENCE)

DO OBJECTS GET CREATED SIMPLY BY SETTING THEM TO A VALUE?

IN DTML:
    user.dogs.fred.john = 1

Have I created a PERSISTENT OBJECT IN ZOPE?
Have I created New Folders?ie;
    [john(property)=1] inside [fred(object-folder)] inside
[dogs(object-folder)] inside [user(object-folder)]
How would I do this in ZOPE DTML?

______________________________


Thanks and Happy Holidays!


Theodore E. Patrick
Indigo Networks

email: tpatrick@indigonetworks.com
phone: 615-777-0070 ext.125