You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@db.apache.org by Peter Leong <pe...@yahoo.com> on 2003/11/13 13:15:08 UTC

Preliminary Project Proposal: 'Record'

Hey Guys,

I have an idea and some code that I'd like to share
with Apache and the OS community.  Forgive me if this
is the wrong way to go about this or the idea is
common knowledge...


INTRO
=====
I've got extensive experience developing Persistence
Layers and using relational databases.  I have learned
that it is almost impossible to prevent SQL being
embedded in application code.

To that end, I've devised a simple technique to
generate those tedious UPDATE and INSERT statements
associated with a typical 'Business Object' (BO). The
idea being to reduce the awkwardness of much of the
SQL instead of preventing it with complicated O-R
bridges and frameworks.


IDEA
====
The idea revolves around delegating a BO's instance
variables (from the DB) to a nested class within the
BO  and using Reflection to generate the SQL
statements and load information from a Resultset. 
This technique is non-invasive as nothing outside the
BO knows about the nested class or its role.


DRAFT LIBRARY
=============
I've spend several hours thinking about the problem
and coding some utility classes.  They are available
online at:
http://geocities.com/oedsrm/record

I'm still working on a descent example usage but I'm
kind of in a hurry to get this 'OUT THERE'.

All feedback and advice is welcome.

Thanks,
Pete


http://personals.yahoo.com.au - Yahoo! Personals
New people, new possibilities. FREE for a limited time.