[Zope3-dev] general question regarding zope3

Garrett Smith garrett at mojave-corp.com
Mon Aug 11 11:08:46 EDT 2003


ChongQing Xiao wrote:
> Sorry, I mean www.erp5.org
> As for handle complex relation, Could you give me zope3 (or zope2)
> examples (link to the document?)

Stephan's bug tracker is a good example of managing a one-to-many
relationship (tracker-to-bug):

Source: http://cvs.zope.org/Products3/bugtracker/
Demo: http://www.zope3.org:8080/demos/++skin++tracker/tracker

ZWiki is an example of a Zope 3 product that implements a many-to-many
relationship (a page can have multiple child and parent pages):

Source: http://cvs.zope.org/Products3/zwiki/
Demo: http://www.zope3.org:8080/demos/++skin++wiki/wiki

The demos should probably come with a disclaimer or two -- the zope3.org
site is a work in progress. Your best bet is to install Zope 3 and these
two products, play with them, look through the source code, etc. Give
yourself some time and be patient -- Zope 3 is pre-beta and the docs are
always in flux. If you go this route, don't hesistate to post questions
here.

Both of these demos use folder-like objects to represent parent data
types. E.g. the bug tracker is basically a specialized folder that
contains bugs. Here's the source:

http://cvs.zope.org/Products3/bugtracker/tracker.py?rev=HEAD

The bug tracker also uses Zope 3 vocabularies to specify various lookup
fields. This would be somewhat analogous to a lookup field using a
table/foreign key in an RDB. Here's the source:

http://cvs.zope.org/Products3/bugtracker/vocabulary.py?rev=HEAD

I'd like to hear more from the list regarding your "complex
relationship" question. The question isn't so much "can" these
relationships be handled, but "how" -- or what's the best approach? Here
are some options:

- Implement object relationships using an object or container attribute

- Implement object relationships using annotations

- Implement object relationships using a relationship object (e.g. an
indexing scheme)

- Implement object relationships using a relationships service (there's
been some discussion about this)

I think you're right to observe Zope 3's content-centricity, but
(personally) I view Zope 3 much more like .NET or J2EE -- i.e. very
capable of handling traditional business applications. I'd encourage you
to keep posting your questions to the list -- there a lot of people here
who'd like to see your type of application built using Zope 3 :-)

 -- Garrett



More information about the Zope3-dev mailing list