Hi Jacob,
 You did a good point. I am working on a project and was in doubt about what use: pure 
JDBC,
DB Layer from iBatis or a real O/R mapping tool. I tested OJB, it is a great piece of 
software.
Looked at Hibernate, it seems like a good choice. I tested also Torque, what is as 
good as others.
 But, to my project i have choosed DB Layer from iBatis. But i am doing some 
customizations on it.
I am adpating it to use Jakarta Commons BeanUtils and, thanks to that, extending 
ResultMap
elements to enable dynamic ResultMaps using DynaBeans since there are moments where 
you can't
write 50 classes only to hold your results, or, you are lazy enough to write it.
 When i finish that modifications i will submit then to Clinton Begin, iBatis author, 
to receive
his agreement about that.
 If you have any cool suggestion about iBatis DB Layer, i'd like to hear it from you. 

Best regards,
 Daniel Silva.
 




--- Jacob Hookom <[EMAIL PROTECTED]> wrote:
> In my opinion, this topic is just fine-- it comes up every week :-)
> 
> I personally dislike O/R mappers because in most cases, I completely agree
> that beans and db should be separated, but it's at the point of merger that
> things get overly complex at the expense of an additional layer that needs
> just as much configuring as writing your sql code for each use case.
> 
> For example, with O/R, you have an ArticleHeader that has ArticlePage(s).
> You are actually storing the page content in the DB for various reasons.  If
> you are using OJB with the goal of getting the number of pages the article
> has, in most cases, you are ending up selecting 1000+% of what you REALLY
> need from the DB:
> 
> -----------------------------------
> OJB:
> SELECT ArticleHeader key
> Check cache
> SELECT ArticleHeader and SELECT ArticlePage keys
> Cache it
> Call getPages() on ArticleHeaderBean
> SELECT each ArticlePage where cached key = DB key while checking the cache
> before EACH SELECT to ArticlePage table for EACH Row
> Builds collection of ArticlePages (including all of that page content)
> Call getSize()
> 
> Vs.
> 
> SELECT COUNT(key) FROM ...
> ------------------------------------
> 
> I guess I really can't reason the practicality of it.  On the other hand,
> the ibatis.com db layer is VERY cool because it allows you to look at your
> use cases and write a select statement that can be executed; much like the
> way struts has actions.
> 
> I get the bonus of caching objects with O/R mappers, but site performance is
> much better by caching the resulting output (the view itself) in most cases.
> 
> Someone please enlighten me as to why someone would want to use O/R mappers
> :-)
> 
> Best Regards,
> Jacob Hookom
> 
> | -----Original Message-----
> | From: Mark Chaimungkalanont [mailto:[EMAIL PROTECTED]]
> | Sent: Tuesday, February 04, 2003 10:24 PM
> | To: [EMAIL PROTECTED]
> | Subject: [OT] Which Object Relational mapping tool?
> | 
> | Howdy all,
> | 
> | This is not about struts really... But I figured it could be relevant for
> | some people. If you know a better forum for relatively unbiased opinion,
> | please  tell me & I'll take it there!
> | 
> | Just looking into O/R mappers and have looked at (Briefly):
> | 
> | Hibernate 2.0 beta 2
> | Castor 0.9.4.2
> | OJB 0.9.8
> | 
> | Does anyone know which is better for what? Which is the most "robust" and
> | mature development? Have any recommendations of any other ones? Had some
> | success/problems? Hibernate SOUNDS impressive and looks quite professional
> | but I haven't used any of them...
> | 
> | Again, sorry for spamming the struts mailing list and will take it
> | elsewhere if it bothers people.
> | 
> | Cheers
> | 
> | MC
> | 
> | 
> | ---------------------------------------------------------------------
> | To unsubscribe, e-mail: [EMAIL PROTECTED]
> | For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to