Re: Mixing OO and DB

From: Robert Martin <unclebob_at_objectmentor.com>
Date: Sat, 8 Mar 2008 19:42:42 -0600
Message-ID: <2008030819424211272-unclebob_at_objectmentorcom>


On 2008-03-06 15:23:41 -0600, topmind <topmind_at_technologist.com> said:

>
>
> Robert Martin wrote:

>> On 2008-03-05 00:20:57 -0600, frebe <frebe73_at_gmail.com> said:
>> 
>>> The reason OO people like to "decouple" the SQL statements is:
>>> 1. OO languages doesn't have good support for embedding SQL.
>>> 2. OO like to model data as a network graph, in opposite to the
>>> relational model.
>> 
>> OO people like to decouple SQL because
>> 1. They don't like mixing high level policy code with low level detail
>> code.  They'd rather partition their code based on abstraction level.

>
> You repeat the same simplistic slogans

This from the man who gave us "function dandruff".

> over and over again until you believe them, like Bush.

Do you really want to bring politics into this? Some of us thing Mr. Bush has done a very good job.

> SQL is *not* any more "low level" than your
> app language (unless you are using it wrong).

SQL is not low level. The details of a query are.

>> 2. They don't like tying themselves to a particular implementation.
>> They want to be able to easily replace the SQL with something else

>
> Can you then hide OOP for me so that I don't have to deal with it?
> After all, OOP is an "implementation detail".

I can hide most of the low level behaviors of the application, and of the OO language, yes.

-- 
Robert C. Martin (Uncle Bob)  | email: unclebob_at_objectmentor.com
Object Mentor Inc.            | blog:  www.butunclebob.com
The Agile Transition Experts  | web:   www.objectmentor.com
800-338-6716                  |
Received on Sun Mar 09 2008 - 02:42:42 CET

Original text of this message