[Zope] enthusiastic newbie needs guidance
Yanick Duchesne
yduchesne@zdnetonebox.com
Wed, 21 Feb 2001 14:11:45 +0000
Hi everyone,
I was a Java addict until I discovered Python and Zope. I am just getting
into Zope, trying to put together a contact manager app as an exercise.
I have a few questions:
a) The contact manager will hold information for contacts(people) within
organizations(companies); organizations will be categorized by predefined
industries, etc. I am not sure how to model this; I am still a bit confused
about how to approach a problem in Zope; it's so different... My first
idea was this:
- Create an 'Organization' ZClass, in which there is a 'Contact' ZClass
- Create an 'Industry' ZClass
Then:
- Create an 'Organizations' folder (contains Organization instances)
- Create an 'Industry' folder (contains Industry instances)
Now, my question is this: how do I relate an organization instance to
an industry instance? How do I materialize that possibility through the
UI - I mean, how do I show the different industries in a listbox in the
Organization's create/update screens? I am still quite confused about
how objects in given folders have access to objects in other folders.
Could someone help me on this - an example may be?
b) Objects, references and ZODB
Suppose I successfuly assign an industry object to an organization object,
how is that persisted in ZODB? I mean, does the organization object only
keep a persistent reference to the industry object, or does it copy the
industry object entirely? What is the proper way to handle such cases
in Zope?
c) "mutable sub-objects should be treated immutably" - from a ZODB point
of view.
I am not sure I completely understand this (I understand mutable and
immutable allright, but I do not see what makes a mutable object being
treated immutably, and how/why it affects ZODB).
Yanick
yduchesne@zdnetonebox.com :)
___________________________________________________________________
To get your own FREE ZDNet Onebox - FREE voicemail, email, and fax,
all in one place - sign up today at http://www.zdnetonebox.com