Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   Any discuss group about Hibernate, Spring? (http://www.velocityreviews.com/forums/t598098-any-discuss-group-about-hibernate-spring.html)

RC 03-12-2008 01:10 PM

Any discuss group about Hibernate, Spring?
 
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?

Lew 03-12-2008 11:46 PM

Re: Any discuss group about Hibernate, Spring?
 
RC wrote:
> 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.

--
Lew

Arne Vajh°j 03-13-2008 01:44 AM

Re: Any discuss group about Hibernate, Spring?
 
RC wrote:
> 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

Markus Tazl 03-15-2008 07:10 PM

Re: Any discuss group about Hibernate, Spring?
 
On 12 Mrz., 14:10, RC <raymond.c...@nospam.noaa.gov> wrote:
> 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/document...nateandspring/

best regards,
Markus Tazl

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

RC 03-17-2008 01:19 PM

Re: Any discuss group about Hibernate, Spring?
 
Markus Tazl wrote:

>
> 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.

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


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/document...nateandspring/


Very good site, I'll learn from there.




All times are GMT. The time now is 10:15 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.