Any discuss group about Hibernate, Spring?

R

RC

Our office soon is going to replace
JDBC with Hibernate. I am new to Hibernate.
I try to follow the tutorial from Hibernate 3.2 doc/reference/
I am stop in chapter 1, wouldn't get the same results as the tutorial!

BTW, what is the relationship between Spring and Hibernate?
Do we need both of them to replace JDBC?

I program with JDBC for many years, feel comfortable with it.
JDBC requires you well know about SQL. Hibernate doesn't require
a programmer know about SQL. Is this a great advantage?
 
L

Lew

RC said:
Our office soon is going to replace
JDBC with Hibernate. I am new to Hibernate.
I try to follow the tutorial from Hibernate 3.2 doc/reference/
I am stop in chapter 1, wouldn't get the same results as the tutorial!
BTW, what is the relationship between Spring and Hibernate?
Do we need both of them to replace JDBC?


You don't need Spring to run Hibernate, but it helps, and it has other
strengths besides. But Hibernate does not replace JDBC - it uses JDBC.
Hibernate doesn't require
a programmer know about SQL. Is this a great advantage?

No, it's a huge disadvantage. Anyone who thinks they can use a SQL-based
RDBMS without knowing SQL is hurting themselves.

Hibernate, and JPA generally, have strengths in managing that SQL, but by no
means should anyone think that they obviate the need for knowing how to use a
DBMS.

BTW, since mostly the same people read the three groups to which you
cross-posted, you should set followup to just one. Cross-posting gives you no
advantage in this instance, and might irritate some folks.
 
A

Arne Vajhøj

RC said:
Our office soon is going to replace
JDBC with Hibernate.

No you will replace direct JDBC usage with Hibernate. Hibernate
uses JDBC.
BTW, what is the relationship between Spring and Hibernate?

None.

Spring is a IOC/DI framework.

Hibernate is an ORM.
Do we need both of them to replace JDBC?

They don't.

It is one of:

your code----JDBC driver----database
your code----Hibernate----JDBC driver----database
your code----Spring----JDBC driver----database
your code----Spring----Hibernate----JDBC driver----database
I program with JDBC for many years, feel comfortable with it.
JDBC requires you well know about SQL. Hibernate doesn't require
a programmer know about SQL. Is this a great advantage?

It is an advantage that Hibernate works at a higher abstraction
level and saves some trivial code.

I will assume that your Java programmers did not have any
problems with the simple SQL needed for CRUD.

Besides you get HQL with Hibernate.

:)

Arne
 
M

Markus Tazl

Our office soon is going to replace
JDBC with Hibernate. I am new to Hibernate.
I try to follow the tutorial from Hibernate 3.2 doc/reference/
I am stop in chapter 1, wouldn't get the same results as the tutorial!

BTW, what is the relationship between Spring and Hibernate?
Do we need both of them to replace JDBC?

I program with JDBC for many years, feel comfortable with it.
JDBC requires you well know about SQL. Hibernate doesn't require
a programmer know about SQL. Is this a great advantage?

Hi RC,

in addition to the excellent answers given by Lew and Arne : for a
first introduction on Hibernate and Spring you could give two books
from O'Reilly a try.

http://www.oreilly.com/catalog/hibernate/index.html
http://www.oreilly.com/catalog/springadn/index.html

In my opinion they are both helpfull for beginners just to get an idea
what it's all about.

If you are familiar with Eclipse you could check out
http://www.myeclipseide.com/documentation/quickstarts/hibernateandspring/

best regards,
Markus Tazl

P.S. Even there is no relationship between Spring and Hibernate using
them together can make life easier ;-)
 
R

RC

Markus said:
Hi RC,

in addition to the excellent answers given by Lew and Arne : for a
first introduction on Hibernate and Spring you could give two books
from O'Reilly a try.

http://www.oreilly.com/catalog/hibernate/index.html

I bought this book, that book published in 2004, the examples in that
book are Hibernate 2.2. Those examples are no longer true for Hibernate
3.2.
All packages have changed from net.sf. to org.hibernate.
package hbm2java is no longer available in 3.2, so I really can't play
around those examples.

I also bought this book, but have start read it, yet.
In my opinion they are both helpfull for beginners just to get an idea
what it's all about.

If you are familiar with Eclipse you could check out
http://www.myeclipseide.com/documentation/quickstarts/hibernateandspring/

Very good site, I'll learn from there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top