Re: Mixing OO and DB

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


On 2008-03-08 07:50:59 -0600, "David Cressey" <cressey73_at_verizon.net> said:

>
> "rpost" <rpost_at_pcwin518.campus.tue.nl> wrote in message
> news:5ea84$47d27a86$839b4533$3167_at_news1.tudelft.nl...
>

>> I always find use of the terms "abstract" and "low-level"
>> terribly suspect.  It's more useful to think in terms of
>> the common (usually, the "abstract") vs. the specific.
>> We always strive to factor out the common from the specific;
>> this is what we call "abstraction".

>
> What is abstraction, really?

The amplification of the essential, and the elimination of the irrelevant.

> It's the omission of some detail, presumably
> extraneous, in order to highlight the features that have not been omitted.
> This is one of the basic tools the human mind uses to deal with complexity.
> It is not an unmixed blessing. At the moment when one of the omitted
> details becomes crucial to the situation at hand, the abstraction begins to
> hinder instead of helping.

True, unless the omitted details are in the function just below the one you are reading. Another reason to keep functions small is so that they don't mix abstraction level. e.g. We don't want to mix string manipulation of URLs with the invocation of business rules in the same function.

-- 
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:46:38 CET

Original text of this message