Be very careful using any kind of framework!

While a framework can give you great benefits through reusable code, hiding 
implementation details and enforcing programming standards, the price you pay is 
performance. When you have a GUI framework, that is usually not a big problem, nobody 
will notice if the framework wastes a few milliseconds or even 10ths of seconds e.g. 
on some unnecessary redraws.

However, a database framework is a completely different issue. I worked with TopLink 
(for SmallTalk) in 1997-1999, and while I think it was very well designed, it did not 
scale very well. Take, for instance, lazy loading (that is, not instantiating/loading 
an object until you actually try to access the value of one of its attributes). In 
theory it's great , reducing queries to the database to a minimum. In real life it can 
be deadly: if, for instance, you wan't to display a list of n-persons and their 
adresses, a non-optimized TopLink (or any ejb container for that sake) will generate 
n+1 SQL statements. The first SQL statement gets all the person data and creates the 
person objects. Then your code iterates through these person objects and displays 
their name and addresses. However, every time you access the address of a new person 
in that loop, the framework/ejb container will generate and execute one SQL statement 
to retrieve that persons address!

There are many ways to overcome this, but when it comes down to it, you have to decide 
if you want to learn java, jdbc and sql or if you want to learn java, jdbc, sql AND on 
top of that, a persistence framework.

Don't get me wrong: I'm all for OO, but it is not a panacea: relational databases were 
designed for handling data. OO-languages, on the other hand, focus on making 
programming better and NOT on data.

Regards
Kim

PS: At the end of the day, if you are too religious about it, you might end up a 
saint, but your surely will be forgotten.


-----Urspr�ngliche Nachricht-----
Von: Andy Bentley [mailto:[EMAIL PROTECTED]]
Gesendet: Montag, 23. September 2002 17:43
An: JDJList
Betreff: [jdjlist] Re: Platform Selection - Should I use J2EE+EJB?


TopLink works great.  Its been around for years. i.e. bugs have been
worked out , production code !!
The only thing to be said against it, is that in some N.I.H. orgs. it
doesn't put the level of control directly into the developers hands. 
Personally I find it liberating to work on the business problems and
not waste everyone's time with OO to Relation mappings.
 

Tomm Carr wrote:
> 
> Joseph Ottinger wrote:
> 
> > For some reason, your question gives me the screaming meemies. The
> > concept is correct - you'd use bean-managed persistence to access and
> > manipulate (and persist) the data, and the latest EJB specs certainly
> > support crossing individual entities... but the idea of adding high
> > volume to "thousands of xml files" with "complex" in their
> > description... I'm not sure you're going to GET high volume, no matter
> > what you do.
> 
> I agree.  XML makes a very good low-end, transaction-free database.  But
> this seems to be have passed "low-end" quite a while ago.  A good DBMS
> is cheap, even Oracle.  He seems to be pushing a technology way beyond
> its abilities, therefore way beyond its usefulness.  The word that came
> to my mind when reading his description was "fragile."  Which means
> trouble, lots of it, and soon.
> 
> For those who need high-powered persistence, but don't want to (or
> can't) handle the conversion from object to relational, go to the Oracle
> site and look for TopLink.  It is free and looks very impressive.  (I am
> only just now examining it, but so far I like what I see.)
> 
> Tomm
> 
> To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm


To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm

To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm

Reply via email to