Re: Mixing OO and DB

From: topmind <topmind_at_technologist.com>
Date: Mon, 18 Feb 2008 22:45:49 -0800 (PST)
Message-ID: <d7c46334-3e4f-4348-b5fb-a9d715c047f3_at_s12g2000prg.googlegroups.com>


Robert Martin wrote:
> On 2008-02-15 18:14:35 -0600, topmind <topmind_at_technologist.com> said:
>
> > On Feb 12, 6:49�pm, Robert Martin <uncle..._at_objectmentor.com> wrote:
> >> On 2008-02-11 12:44:28 -0600, topmind <topm..._at_technologist.com> said:
> >>
> >>> A bigger issue is how to manage "variations on a theme". OOP tends to
> >>> use polymorphism and object pointers, while a data-centric approach
> >>> tends to use set theory and attributes (meta data). I much prefer the
> >>> second. I won't claim it objectively better, but to my mind it is a
> >>> lot nicer, more flexible, and easier to report/study/sift via query
> >>> and table browsers.
> >>
> >> I won't disagree with any of that. �I will say, however, that I can
> >> manage the dependencies between source code modules with OO,
> >> and I can't with data. �
> >
> > The trick is to shift to a declarative interface/logic so that less
> > is
> > in app code. Change the problem instead of trying to solve the
> > wrong problem.
>
> Of course! And yet there will still be source code that has
> dependencies that need to be managed.

Well, I'd like to see OO at work and helping in a situation where domain noun taxonomies are moved to a data-driven architecture.

>
> >> There are other dependencies I can manage with data,
> >> that I can't with OO. �Both are useful. �Neither is better than the
> >> other. �They are orthogonal and complementary.
> >
> > I disagree. They tend to fight over the same territory.
>
> The trick is to change the problem instead of trying to solve the wrong
> problem. They only fight over the same territory if you put them into
> the same territory. Don't do that. OO is not about data. Don't make
> it about data.

I already gave reasons for shifting toward a data-centric approach *instead of* a behavior-centric one. In short, data is more math-able than behavior, and is more cross-app-language-able.

It is kind of like the choice between binary circuits and trinary circuits. Binary is better understood and has more math and standardization behind it.

Maybe someday there will be a Dr. Codd of Behavior. Until that day, data has the edge.

>
> --
> Robert C. Martin (Uncle Bob)��| email: unclebob_at_objectmentor.com

-T- Received on Tue Feb 19 2008 - 07:45:49 CET

Original text of this message