Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Persistence Framework

 
evan chris
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Folks,

Am looking for some kind for information in choosing the backend framework. I have many framework in front of me but got confused.

- Spring framework
- Hibernate
- IBaptis
- DAO
- EJB
- JDBC

Pls throw some light on this.

thx
Bala
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are your requirements???
 
Scott Ambler
author
Ranch Hand
Posts: 608
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I cover the basic concepts of persistence frameworks at Encapsulating Database Access and The Design of a Persistence Layer. Between the two essays you should learn the basics of the concept and then be able to determine what you actually need from the framework.

For detailed mapping requirements, Mapping Objects to RDBs will provide some ideas for what you should look for.

- Scott
 
evan chris
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
scott / ilja,

thanks for your response. my requirement is not complex. I can go for simple JDBC / EJB calls. I thought of implementing the open source framework in my current project which gives good performance, in turn helps me to learn another technology.

Pls let me know your suggestions to chose the best persistence framework opensource.

I appreciate your effort.

thanks
Evan
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the Object Relational Mapping forum.

Well, I changed my mind since not all the frameworks you mentioned are all about persistence. Spring and EJB I wouldn't classify as persistence frameworks. Yes, EJB has Container and Bean Managed Entity beans, but that is a specification, not an actual framework, per say. The Spring is more of like an Application Container Framework, that is more involved than persistence. And with Spring and EJB, most people will still use a seperate persistence framework.

OK, so I will move it anyway.

Mark
[ July 13, 2005: Message edited by: Mark Spritzler ]
 
Pj Murray
Ranch Hand
Posts: 194
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

Learning a new technology is not a great criteria for choosing a Java persistence strategy for an application (unless that's the purpose of the project). It's good that the initial responses have been about your technical requirements - that's certainly where you should start.

Your list of options includes a diverse range of items related to Java persistence. Can I suggest that you read "Choosing a Java Persistence Strategy" to get started:

http://www.codefutures.com/weblog/andygrove/archives/2005/01/choosing_a_java.html

From your list:

-DAOs are a design strategy - see below.

-By EJB I presume you mean EJB CMP - you still need an EJB container.

-Spring is more of a container than specifically a persistence framework.

-JDBC is still the most used Java persistence technology - and its a good solution if you're also using DAOs.

-Hibernate - the most popular free open source Java persistence framework.


You can read a more detailed comparison of most of the technologies you mention here:

http://www.codefutures.com/weblog/corporate/archives/2005/02/data_persistenc.html


Data Access Objects

DAOs are a design decision and best practice. Read Scotts "Encapsulating Database Access" to see where DAO fits in.

You should consider using DAOs even if you decide to use an ORM persistence framework. I recently wrote a blog entry on the topic of DAOs and Hibernate:
http://www.codefutures.com/weblog/corporate/archives/2005/07/hibernate_suppo.html

Also, you can find a discussion on "Data Access Object (DAO) versus Object Relational Mapping (ORM)" here:

http://www.codefutures.com/weblog/andygrove/archives/2005/02/data_access_obj.html


As you can see, what CodeFutures is suggesting to Hibernate users is that they at least try both straight Hibernate and Hibernate with DAO.


There are some non-technical factors that you should consider when choosing a Java persistence technology. Here's a management perspective on the topic:

http://www.codefutures.com/weblog/andygrove/archives/2005/05/java_persistenc.html



So, you've got lots of homework!

Between reading Scott Ambler's excellent material and CodeFutures' less formal blogs you should be able to figure out a strategy that is appropriate for your requirements.
 
Mike Keith
author
Ranch Hand
Posts: 304
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Since this seems to just be a place to shill your product let me add my shilling to the mix.

Oracle TopLink is the most widely used commercial O/R mapping product on the market so if you have any serious requirements I recommend you download it and benchmark it against any other product that you are considering.

http://www.oracle.com/technology/products/ias/toplink/index.html

There are some white papers available there as well that you might want to put on your homework stack.

If you are just playing around then any old O/R mapper will do. Whatever you do, if you predict that your app will EVER grow to use more than just a handful of classes then please don't use JDBC. Use an O/R mapper, any one. I have seen too many companies get lured into rolling their own persistence for just a few objects, and it grows, and grows, until they end up with their own franken-mapping layer and wish they had done a little more planning up front.

-Mike
TopLink Architect
 
Appu Chan
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I would suggest Hibernate for Persistence and Spring for the Application framework.

Howie
-----
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic