Advanced Search
Start Your Free Trial

Overview

Other Readers Also Read...
Spring in Action, Second Edition

Spring in Action, Second Edition
by Craig Walls; Ryan Breidenbach

Top Sellers in this Category

Head First Java, 2nd Edition

Head First Java, 2nd Edition
by Kathy Sierra; Bert Bates

Head First Design Patterns

Head First Design Patterns
by Eric Freeman; Elisabeth Robson; Kathy Sierra; Bert Bates

Java Concurrency in Practice

Java Concurrency in Practice
by Brian Goetz; Tim Peierls; Joshua Bloch; Joseph Bowbeer; David Holmes; Doug Lea

Harnessing Hibernate is an ideal introduction to the popular framework that lets Java developers work with information from a relational database easily and efficiently. Databases are a very different world than Java objects, and they often involve people with different skills and specializations. With Hibernate, bridging these two worlds is significantly easier, and with this book, you can get up to speed with Hibernate quickly. Rather than present you with another reference, Harnessing Hibernate lets you explore the system, from download and configuration through a series of projects that demonstrate how to accomplish a variety of practical goals. The new edition of this concise guide walks you through Hibernate's primary features, which include mapping from Java classes to database tables, and from Java data types to SQL data types. You will also learn about Hibernate's data query and retrieval facilities, and much more. By reading and following along with the examples, you can get your own Hibernate environment set up quickly and start using it for real-world tasks right away. Harnessing Hibernate teaches you how to:

  • Perform Object/Relational mapping

  • Work with persistent data from Java code

  • Work with groups and relationships between objects

  • Extend Hibernate's rich type support for your own needs

  • Simplify query creation using criteria and examples

  • Use the Hibernate Query Language (HQL) and understand how it differs from SQL

  • Use Hibernate in conjunction with Spring

  • Use Hibernate in conjunction with other packages, such as the Stripes web framework and the Eclipse IDE

Once you're past the first few chapters, you can jump to topics that you find particularly interesting or relevant. All background material and explanations of how Hibernate works and why is in the service of a focused task. Source code can be downloaded from the book's website. If using SQL is an uncomfortable chore, Harnessing Hibernate offers you an effective and trouble-free method for working with the information you store in your applications.

Amazon.com® Reader Reviews (Ranked by Helpfulness)

Average Amazon.com® Rating: 3.5 out of 5 rating Based on 19 Ratings

Poorly Organized and Edited - 2009-05-28
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
The amount of useful information in the book is much shorter than the book itself. The examples and bullet point explanations are good and is where you will get most of the value from the book. Those can easily fit into a book a quarter of the size. The rest are just useless asides that get in the way. For example, the author(s) try to crack jokes about rich friends in the chapter about relations (get it, friends and relations? Not funny and useless). The book would have been more valuable if it was condensed and better organized. Furthermore, this book doesn't talk nearly in depth enough about Hibernate. It wastes almost half of the pages on non-Hibernate related information such as Maven and Spring. If your project deviates even slightly from the prescribed path, you'll be lost because the book doesn't give you enough of a foundation to find your own way.

If you really want to learn Hibernate, get the Gavin King book. King is one of the founders of the Hibernate project and his book reflects his depth of knowledge.

A very poor book - 2009-03-23
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
This is a very poor book. I am returning it.
This book is a mere overview of Hibernate. It should focus on fundamental concepts like the session, dealing with versions, or managing transactions, instead, it deals with technologies that have nothing to do with Hibernate like Maven for the second half of the book. Very disappointing.
The book on Hibernate from Gavin King is definitely much better, for a beginner as well as a more advanced developer.

Skimpy on Hibernate details - 2009-10-07
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
There's a lot of stuff in here that seems out of scope for a book on Hibernate. Here's a brief list:

1) After you spend 9 chapters getting up to speed on doing the book's music library project example using HSQLDB, there's another chapter on porting it to MySQL. Necessary, I suppose (though it seems like Hibernate's whole reason for being is that it easily adapts to multiple DBMS's), but it seems like this would be better suited for an appendix.

2) There's an entire chapter on Maven. And not just Hibernate plugins for Maven. Straight Maven (well, not really, see below). Admittedly, Maven has really grown on me over the last three months or so. This book, however, is about Hibernate. Oh, did I mention that, pagewise, the Maven chapter is the longest chapter in the book (tied with the Eclipse Hibernate chapter)?

3) There's an entire chapter on Eclipse Hibernate tools. Like the MySQL stuff, this seems better suited for an appendix. Netbeans has some good Hibernate tools too (and reads Maven pom.xml 's natively!), but it gets left in the cold.

4) There's a chapter on wiring up the music project to a web interface using Stripes. That'd be great...if the author hadn't skimped on so much Hibernate stuff.


The author seems to have me in his target audience: Java application developers who aren't database experts and who are also Hibernate novices. And yet, I had to find out the answers to these questions elsewhere: What about one-to-one relationships; why doesn't Hibernate create properties in my Java classes to represent them? In fact, what about relationships besides many-to-many and one-to-many? If I buy into lazy associations, what keeps my application code from getting cluttered up with Hibernate session and transaction calls? (this kind of gets answered in the Spring chapter, but that's at the very end of the book) Can I generate my entire database schema with .hbm.xml files and hbm2ddl, or only the tables that feed my persistent objects? What if I want to insert or retrieve data from a view instead of a table? What if I want to insert data into a table but retrieve it from a view? What if I want to use hbm.xml files and hbm2ddl but I also want some extra methods (like derived properties) to wind up in my Java classes? What do the attributes in an hbm.xml file really do? I make all these persistence-aware objects; what kind of aggregation assistance can Hibernate give me?

And to top it all off, the Maven that the authors use isn't straight Maven, but this confusing mashup of Maven from within Ant. Now, Maven is awesome, especially from the standpoint of writing a book. Rather than saying "to do the projects in this book, you need version X of this library and version Y of that library and you need to put them in location Z, then hack your classpath like so...", you can say "Just download this pom file, put it in your project root. Make your source directory src. Make sure you're connected to the internet when you first execute the build. The end." But to try and pigeonhole Maven's concepts into an Ant buildfile is making it overly complex. I wish the authors would have just said "look, Ant sucks; use Maven instead, because we're going to."

Perfect guide to setting up an useful developing environment - 2009-09-18
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
This book is excellent for developers with less experience on setting up a developing environment using hibernate and related tools.
Specially the chapters about Ant and Maven are very interesting if you have never had the opportunity to work with these powerful tools.

The chapter about Spring is very useful as well.

The only thing I should criticize is the DB model the authors chose. It's not consistent from my point of view.

Hence, except for that, I would say that this book is an excellent guide to set up a productive environment using hibernate.

Too much use of maven - 2009-09-07
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
This book uses maven for build the examples and I tried to use maven ,but it shows so much issues to pulling out dependencies from repositries. Maven was unable to download all the jar files as mentioned in the maven script. So I did not get a confidence to use this book's example.

Some information on this page was provided using data from Amazon.com®. View at Amazon >


About Safari Books Online • Terms of Service • Privacy Policy • Contact Us • Corporate Licenses • Help • Accessibility | See us on FacebookSee us on Linked InSee us on TwitterRSS

Copyright 2009 Safari Books Online. All rights reserved.