Jason and all,

O'Reilly's JDBC book has what you are looking for. In fact, the book
is really about object-relational (OR) mapping and related infrastructure
rather than JDBC but many people dont know it. The framework detailed in the
book has been praised a number of times on a number of mailing lists and
newsgroups; it can be made scalable with a relatively few modifications. You
can download the source code for this from O'Reilly but you will certainly
need the text to provide the explanation.

If you're intested in commercial OR mapping products (and OR 'problem' in
general), see www.kinetica.com/ootips under 'Persistence and Databases'
category. (As an aside, each and every byte under that URL should be
absorbed by any OO hacker worth his salt).

<RANT>

A long time ago I've inquired on comp.object what is the best way to go
about OR mapping -- from objects to the database, from database to objects
or what and received a number of replies from the likes of Robert Martin and
others. There was no consensus but everyone had a warm feeling about the
'best of both worlds' -- the relational model should be done to the maximum
relational effect, the object model should be done to the maximum OO effect
that reflects the domain and the OR layer should provide the bridge between
these two essentially orthogonal (in behavioral terms) domains. Sounds
great, doesnt it?

Well, I followed the advice and tried it on a project. After much laughing
and pain, all involved realized that OR mapping is just about the dirtiest
trick in the OO book, possible <b>in practice</b> only in one direction.
That is, you can create a relational model from the object model or the
other way around but if you have both of these done and want to bridge them,
good luck. Perhaps Robert Martin is capable of doing this but I doubt many
humans are up to the task if the domain has anything but low complexity.
YMMV. On top of this, you'll have to deal with the proverbial overhead of
creating objects (expensive) and manipulating them in memory (expensive if
you're using 1.1 java.util classes which is what most OR packages use now).

I've seen a few projects where a claim of 'pure objects' (equates to working
OR layer) was made. After looking at the code, it became clear that the
objects were lifeless and acted as simple data and relationship containers
(read: mimicked the database)...but many people think of themselves as OO
developers once they've written a class, so I digress.

If you are willing to use OR mapping in one direction, I've heard good
things said about Form (chimu.com) and GemStone's application server with
integrated persistence cache (read: built-in semi-automatic OR mapping layer
courtesy of GemStone-modified VM; prepare to fork over $$$$).
kinetica.com/ootips has the info on the rest of the packages.

Sure, you could always use an object database! (I should wait till April 1st
for this to sink in).

</RANT>

Hope this helps,

Alex.


_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to