Topic: i'm looking for a persistence layer solution , ejb or jdo or o/r mapping ? |
Print this page |
1.i'm looking for a persistence layer solution , ejb or jdo or o/r mapping ? | Copy to clipboard |
Posted by: fangcm1971 Posted on: 2003-03-13 10:25 i'm looking for a persistence layer solution , ejb or jdo or o/r mapping ? 1 ejb entity bean 2 ojb (apache's project) 3 hibernate (sourceforge's project) Give me a suggestion , please ! |
2.Re:i [Re: fangcm1971] | Copy to clipboard |
Posted by: ftang Posted on: 2003-03-14 04:10 A good solution depends on your detail requirements, your project. There is NO one single solution that works for all projects. so tell me what is your detail requirements. what database, how many tables or data entries, is your application distributed, what are the data queries, are the quries read-only or read-write, what is the client of your persistent layer, how do you want the transaction to be handled, etc. you have to consider all these detail requirements before you could get a good solution. if your project is a small one, just use SLSessionBean + DAO. If you plan to use EntitnyBean, do NOT use EJB1.1. |
3.Hibernate [Re: fangcm1971] | Copy to clipboard |
Posted by: why Posted on: 2003-03-14 07:30 Totally agree with ftang. However, I would recommend Hibernate if Hibernate meets your requirements. I like Hibernate, it is simple (comparatively) and stable and the documentations are very nice... already good enough, right ; OTOH, maintaining EntityBeans and DAOs could be a nightmare, and OJB seems to moving towards JDO -- I don't think JDO is ready, though I'm going to use Kodo or LiDO in a coming project, since my boss/client like the buzzword JDO. Here're some discussions on OJB and Hibernate: http://www.freeroller.net/page/ceperez/20021212#why_hibernate_is_better_than How and why did this come about? My guess is that Hibernate's goal is "Build the best OR-mapping tool in the planet". OJB's goal however is more like "Build the best ODMG/JDO tool in the planet". http://www.rollerweblogger.org/page/roller/20021212 http://www.porterhome.com/roller/page/matthew/20021212 http://roller.anthonyeden.com/page/ceperez/20021221 Hibernate says "do one thing well", "avoid over design" and "avoid standardism". While OJB says "provide several personalities", "give developers a choice" and a "layered architecture shared by all three toplevel personalities". http://blogs.cocoondev.org/tomk/archives/000720.html Yes, the Hibernate docs are MUCH better than OJB's. http://fishbowl.pastiche.org/archives/001195.html (From the Hibernate Q&A) But what really makes Hibernate so good? It wasn't designed by a committee. Hibernate grew out of experience in an actual software project. It doesn't try to be all things to all geeks and so succeeds in doing one thing well. |
4.open source JDO [Re: fangcm1971] | Copy to clipboard |
Posted by: why Posted on: 2003-03-14 08:06 BTW there're other open-source JDO implementations besides OJB: JORM : http://www.objectweb.org/jorm TriActive JDO : http://tjdo.sourceforge.net/ XORM - Extensible Object-Relational Mapping : http://xorm.sourceforge.net/ |
5.Re: persistence solution [Re: fangcm1971] | Copy to clipboard |
Posted by: lxia Posted on: 2003-03-14 08:54 I have spent much time studying various persistence solutions including EJB, Torque, Castor JDO, OJB , Hibernate . I think EJB is a heavy weight solution , althouth there are many good code generation tools to simplify the job , it is relatively complex , if your project is small and don't need complex features like load banlancing and security management etc , don't use the EJB solution . Torque is simple and powerful , the opensource project scarab (a bug tracking system on www.tigris.org) is built on torque , so it's a proven technique . JDO is not a ready technique but it will be a trend , maybe I will considing using it next year . I agree with why that Hibernate is a good solution , simple and powerful , I am using it in my current project . |
6.Re:i [Re: fangcm1971] | Copy to clipboard |
Posted by: ftang Posted on: 2003-03-14 10:59 thanks why and lxia. I learn. JDO seems to be the future, probably will replace EntityBean to be part of J2EE spec, as the author of "Expert One-On-One J2EE Design and Development" thinks. I hope that day comes soon... currently my projects are still using DAO and EntityBean. damn. |
7.Re:i [Re: fangcm1971] | Copy to clipboard |
Posted by: fangcm1971 Posted on: 2003-03-14 11:34 thanks for yours answers (ftang,why,lxia ) . i just select a best framework to implement my web app . and i hope it became a general way. currently my project have 50 tables (Oracle db) . |
8.Object Relational Mapping Tools [Re: fangcm1971] | Copy to clipboard |
Posted by: why Posted on: 2003-03-17 03:13 SimpleORM.org has this page comparing different O/R tools on the market. It's supposed to be an ongoing report. Of course they'rre bound to be a little biased but it's very informative nonetheless. (from: http://freeroller.net/page/goofrider?catname=Java 2002.09.24) |
9.Re: JDO vs Hibernate [Re: why] | Copy to clipboard |
Posted by: why Posted on: 2003-05-28 05:00 Here's a thread on JDO vs Hibernate: http://www.javalobby.org/threadMode2.jsp?forum=61&thread=7836 Yesterday I worked with Hibernate again and I found another reason to like Hibernate: Use hand-coded JDBC in bottlenecks. In performance-critical areas of the system, some kinds of operations (eg. mass update / delete) might benefit from direct JDBC. But please, wait until you know something is a bottleneck. And don't assume that direct JDBC is necessarily faster. If need to use direct JDBC, it might be worth opening a Hibernate Session and using that SQL connection. That way you can still use the same transaction strategy and underlying connection provider. (from http://hibernate.bluemars.net/hib_docs/reference/html/best-practices.html , pointed out by Alex Besogonov on his post on TSS.) can one do the same with JDO? Here are some pointers on Hibernate main page ( http://hibernate.bluemars.net/1.html ) Object to Relational Mapping and Relationships with Hibernate http://www.meagle.com:8080/hibernate.jsp Hitchhikers Guide to Hibernate http://glen.blog-city.com/files/1018/b/HibernateKickstart.html |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |