Re: The wisdom of the object mentors (Was: Searching OO Associations with RDBMS Persistence Models)

From: phlip <>
Date: Thu, 01 Jun 2006 21:15:20 GMT
Message-Id: <>

Bob Badour wrote:

>> An application should have its SQL statements in only a few modules, and
>> all others should be SQL-free.
>> Note in my statement, you can replace SQL with GUI, XML, ORB, etc, to
>> generally the same effect. The point of modules is to isolate and
>> encapsulate.
>> Is that so hard?
> Define: few

Encapsulation is hierarchical. The longer the conceptual distance between any two points in a program, the narrower their communication should be, if any.

So the few modules that have SQL in them should have wider communication with each other than with others. Sometimes we call that a "Layer".

Define: wider, longer, narrower, sometimes, etc. Answer: When you don't mix SQL in with your GUI, XML, ORB, and other what-not modules.

The alternative is like Visual Basic kiddie-kode, with multiple rampant SQL statements inside every button event handler. That's bad, so don't do that!

Define: bad


Received on Thu Jun 01 2006 - 23:15:20 CEST

Original text of this message