Re: Mixing OO and DB
From: Robert Martin <unclebob_at_objectmentor.com>
Date: Tue, 12 Feb 2008 20:54:05 -0600
Message-ID: <2008021220540582327-unclebob_at_objectmentorcom>
Date: Tue, 12 Feb 2008 20:54:05 -0600
Message-ID: <2008021220540582327-unclebob_at_objectmentorcom>
On 2008-02-11 15:28:39 -0600, "David Cressey" <cressey73_at_verizon.net> said:
> We do both deal with data,
> don't we?
Yes, but in very different ways, and with very different emphasis.
OO is about structuring modules around behavior and hiding data. The
structure and form of the data is hidden as deeply as possible, so that
no other behaviors depend upon it.
DBs are about structuring data, and the access to that data. Behaviors are secondary, and often hidden. One of the goals of a good data model is to facilitate as many behaviors as possible; and to depend on none of them.
-- 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 Wed Feb 13 2008 - 03:54:05 CET