Re: Mixing OO and DB

From: Robert Martin <unclebob_at_objectmentor.com>
Date: Tue, 4 Mar 2008 16:32:32 -0600
Message-ID: <2008030416323223810-unclebob_at_objectmentorcom>


On 2008-03-03 06:50:39 -0600, "David Cressey" <cressey73_at_verizon.net> said:

> In my original perspective, the single thing that ties together all the
> applications and all the databases that collaborate by sharing data is just
> one thing: data. If you understand the data, and you understand the
> (observable) behavior of each of the applications and each of the databases,
> you can understand the system. Otherwise, you can't understand the system.

First of all, I'd like to thank you for that. It was very well done, and I found it educational.

Niklaus Wirth once wrote a book entitled: "Algorithms + Data Structures = Programs". I think that title should be taken seriously.

I completely agree that you cannot understand a system unless you intimately understand the data. By the same token you cannot understand a system unless you intimately understand what it does with that data. Data and behavior are perspectives, but not ends in and of themselves. You can look at a system from a data point of view, but you can't escape the need to understand the required behaviors of that system. By the same token you can look at a system from a behavior point of view, but you can't escape the need to understand the data.

It seems to me that some folks in these forums think that one point of view is more valid than the other. That's absurd. There is no truly favored point of view. Both need to be taken very seriously.

However, when writing application code is often advantageous to take a behavioral perspective. By the same token, when designing queries and modeling enterprises it helps to take a data point of view.

-- 
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 Tue Mar 04 2008 - 23:32:32 CET

Original text of this message