This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate--Mapping files or Annotations

 
Dinakar Kas
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the better approach for using the Hibernate in a new project? Use XML mapping files or JPA annotations?

Thanks,
Dinakar.K
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its entirely personal preference really, both have pros and cons. Some people don't like mapping data separate from the code, others don't like cluttering the code with mapping data. Both provide the same functionality.
 
Dinakar Kas
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul.

I fall in the category of people who don't like to write xml files. so, may be annotations suit me better.

I happened to see a tutorial on Hibernate using JPA at http://www.thebookonhibernate.com/HiberBookWeb/index.jsp by the author of Hibernate Made Easy and found it amazing.

Did any one read the book Hibernate Made easy? Is it as good as the tutorial given?

Thanks,
Dinakar.K
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, it's even better than the tutorial given. Really, it's one of the best books you'll ever read, right up there with "Catcher in the Rye."

Hubris aside, the book has been very popular and has helped many get started in Hibernate. I'm sure you'll love it. (I'm the author).

-Cameron McKenzie
 
Dinakar Kas
Ranch Hand
Posts: 34
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Cameron. I am going today to buy it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic