hi all,
wouldn't an object-relational mapping approach, such as hibernate,
toplink,
etc., provide for an even greater degree of transparency, a lot less code,
and
practically no SQL (because the SQL is auto-generated)? in addition, to
minimize db management code even further, i would think using aspects
(e.g.,
aspectj) to treat persistence as a cross-cutting concern would further
reduce the amount of code to be written, simplify that which does have to
be
written, and centralize all the persistence code so that it's easier to
manage
and guaranteed to be applied consistently.
just my $0.02. i'd be curious to hear arguments for or against this.
cheers,
doug
On Sun, 18 Nov 2007 05:27:23 GMT, Durango2008 <el_durang0@[EMAIL PROTECTED]
>
wrote:
> Hi this is really not a Java specific question but more in regards to
OO
> design in general. I have an application which has access to multiple
> tables in a database and a multitude of different SQL statements for
> manipulating the many tables and retrieving data from them. The part I
am
> struggling with is a good class design for the Java code which deals
with
> the DB.
> I would like to achieve the following:
> 1. Separating DB code from the main application code.
> 2. Reducing code redundancy
> 3. Managing SQL statements in a good way.
>
> For the most part I can deal with items 1 and 2, however the managing
of SQL
> statements is the part that gets me.
> There will be a huge number of different SQL statements needed for this
> project.
> ...


|