On 6/17/05, Jim Vine <[EMAIL PROTECTED]> wrote:
> I'm very interested in the Object Oriented way of
> doing things; for example, I'm thinking about
> implementing houses as a folder-ish object, so it
> would be able to contain photos of the house in
> question. The biggest stumbling block I am facing is
> how to do something "Relational" in an OO environment.
> Specifically, I've been scratching my head for a while
> about how to handle a many-many relationship: a
> property owner may own more than one house;
> conversely, a house may have more than one co-owner -
> consequently it's not appropriate to have either
> containing the other. I've googled for general
> information about handling many-many relationships in
> OO, and most of what I've come across has only
> indicated that it can be tricky!
Nah. You either let every PropertyOwner have a list of the ids of
HouseProperty objects, or the other way around. Then you index this is
the catalog so you can search. Tada!
> Having a look through past threads on this mailing
> list I've noticed a few references to mxmRelations
> which seems to match up - have I got the right end of
> the stick?
Relation products often are aimed at making arbitrary relations
between different objects. it's cool, and useful. It may be overkill
in this case, unless you want to for example have different types of
owners. Then it fits perfectly.
http://zemantic.org/ Is the relations tool that seems to emerge as the
preferred one in the zope3 environment.
> While I'm on, I've noticed that Zope 3 has been
> released. Is this now the recommended development
> environment, or am I better off sticking with Zope 2
> for now, and porting my application once Zope 3 is a
> bit further down the line?
For applications development, zope3 is definitely recommended. Zope2
is only recommended if you you want to use a CMS application, like
Plone, CPS, or something else. There isn't one for zope3 yet.
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists -