Re: Clean Object Class Design -- What is it?

From: Carl Rosenberger <carl_at_db4o.com>
Date: Sat, 28 Jul 2001 02:52:25 +0200
Message-ID: <9jt2h3$eo7$01$1_at_news.t-online.com>


bok wrote:
> > Does anyone have any pointers to a programming language that supports
> > navigating from child to parent?
>
> If the object model supports the definition and the implementation provide
> automatic maintenance of the inverse end-points (single valued or
> multi-valued) then such navigation should be possible in any OO language.
> That is the approach we have taken in JADE.

Hi Bok,

of course you can easily create and use an in-between class for bidirectional navigation (single-value or multi-valued). In Java this would just usually require quite a lot of casting.

You could also define member attributes on all the involved classes for bidirectional links. An additional link factory class might maintain these links automatically.

We also support storing both of these approaches.

The necessary work to be done is quite similar to the maintenance of keys in relational databases. Maybe OO is only said to be so rigid, because special "Link" objects are not commonly used in OO systems?

What I meant was a little different:
Given the commonly used construct "parent.child", is there a language that allows getting the parent from the child?

Kind regards,
Carl

---
Carl Rosenberger
db4o - database for objects - http://www.db4o.com
Received on Sat Jul 28 2001 - 02:52:25 CEST

Original text of this message