Re: The wisdom of the object mentors (Was: Searching OO Associations with RDBMS Persistence Models)
Date: 3 Jul 2006 15:43:05 -0700
Message-ID: <1151966585.104514.52450_at_h44g2000cwa.googlegroups.com>
Robert Martin wrote:
> On 2006-06-21 12:48:40 -0700, "erk" <eric.kaun_at_gmail.com> said:
>
> > I just think (after 8 years of O-O, beginning
> > with being a true enthusiast) that coupling data and behavior hobbles
> > both
>
> OO does not force you to couple OO and data, it *allows* it. I agree
> that there are costs and benefits to this coupling, and so we can
> decide to do it, or not, on a case by case basis.
I think the problem is that one does not know *ahead* of time if they will stay coupled in the domain situation or drift apart. I see a lot of drift in my experience, so there is little or no benefit to up-front coupling.
Isolating them is actually black-boxing the behavior behind an interface. If I have:
doX(...);
in a program, I usually don't have to know what nouns/entities it uses to carry out the task. If we coulple them and have:
nounFoo.doX(...);
then we may be exposing the innards of "doX" by forcing one to think about what nouns are used to carry it out or which the action is attached to.
>
> --
> Robert C. Martin (Uncle Bob) | email: unclebob_at_objectmentor.com
-T- Received on Tue Jul 04 2006 - 00:43:05 CEST