• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

hibernate doubt

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
In what kind of applications should we use hibernate.Could someone tell me its advantages.
I noticed in hibernate for each table in the database we need to have a an xml file and a Java POJO.Is it not an overhead?
I feel using JDBC to query the database more comfortable.But I might be missing something about it.I am new to J2ee technologies and have come up with this doubt when started learning hibernate.
Thanks in advance.

suneetha.
 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I see a simple advantage of using Hibernate (or any similar): you'll just work with objects in your code, the code looks cleaner.

Besides that, Hibernate does the hard work of persisting the objects (he does the inserts/updates/deletes for you).

Also, the part of creating the XML and POJO files is already automated by many tools (see Hibernate Tools for Eclipse).

The counterpart is if your app is too focused on database procedures, then I think you wont get too much benefits from Hibernaate.

[]�s
Wagner Danda
 
sunitha chekuri
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Wagner,
Thank you for your response.I seem to understand it, but I may feel the difference when I really work on a hibernate project.

After I posted this I found a very well written Return on Investment article on hibernate.This is the URl.

http://www.jroller.com/page/gursesl/print/p_class_msonormal_span_style

Thanks,
suneetha
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sunitha,

While Hibernate is definitely a good option to research, you should know that it is not the only one. iBATIS for instance is another widely supported framework framework for Java and .NET. iBATIS couples objects with stored procedures or SQL statements using a XML descriptor. What it brings on the table is simplicity. Now, arguably Hibernate is also based on simplicity. So, do the research, run two small prototypes and see for yourself.

On the features side, with iBATIS Data Mapper, you rely on your own objects, XML, and SQL. So, it claims to give you greater power of both SQL and stored procedures for your business logic. Whether you want to put business logic on the data layer is another question that only you can answer.

Sincerely,
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Levent Gurses:
Sunitha,
On the features side, with iBATIS Data Mapper, you rely on your own objects, XML, and SQL. So, it claims to give you greater power of both SQL and stored procedures for your business logic. Whether you want to put business logic on the data layer is another question that only you can answer.

Sincerely,



Sunitha, If you love SQL, comfortable with it, then use iBATIS. It is the simplest framework and is quite easy to get started with. When using Hibernate, expect a steeper learning curve.
 
If you believe you can tell me what to think, I believe I can tell you where to go. Go read this tiny ad!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic