Re: Mixing OO and DB
Date: Thu, 28 Feb 2008 16:29:46 -0500
frebe <frebe73_at_gmail.com> 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
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. pjm_at_spe.com | (C++, Java, Common Lisp, Jini, middleware, SOA)Received on Thu Feb 28 2008 - 22:29:46 CET