Re: Mixing OO and DB

From: Patrick May <>
Date: Thu, 28 Feb 2008 16:29:46 -0500
Message-ID: <>

frebe <> writes:
>> We still have it, and we still use it. But we also hide it from
>> the bulk of the application.
> What is the benefit with hiding SQL from the bulk of the
> application?

     For one thing, it decouples the application code and the database schema. For another, as noted by Mr. Martin, it allows the creation of a domain specific language that better reflects the concepts in the problem and solution domains.

> If you have a lot of find_by_xxx methods, swapping would still be
> quite difficult.

     That is true. In my experience there isn't usually a proliferation of such methods because traversal is done by object reference rather than by some subset of object state.



S P Engineering, Inc. | Large scale, mission-critical, distributed OO
                       | systems design and implementation.
  | (C++, Java, Common Lisp, Jini, middleware, SOA)
Received on Thu Feb 28 2008 - 22:29:46 CET

Original text of this message