• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Some Spring/Hibernate examples for hands-on ?  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

It feels great to join the coderanch !!!, as so much good stuff to learn from the forum.

I really thanks coderanch !!!.

So here is my query/questions, I am java programmer have started learning about Spring/Hibernate framework.
I dont have much hands on with spring, some hands on DI(dependency injection) and MVC.

I really want to understand more about spring/hibernate with end to end.

could you please point me to the some real world examples and exercises to learn and try out.

really appreciate your responses


Thanks
Nijam
 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nijam,

Welcome to coderanch.

Unfortunately, there are multiple ways to implement a DAO in Spring. And you have to pick one

Hibernate - Spring allows you to intialize the SessionFactory in the configuration, and takes care of obtaining Session, and managing transaction for you. The DAO that you impelment will have a Session injected into it, and all you do inside the DAO is the data access operations, without worrying about getting Session and opening transaction

JPA - Similarily, If you choose to use JPA, Spring allows you to define a EntityManagerFactory in the Spring configuration, and manages transaction.

Spring Data JPA - Spring Data is a Spring project that allows you to eliminate most of the code in your DAO. You basically just write the JQL queries

To learn about how to use Hibernate and JPA directly, look here. To learn about Spring Data JPA, look here
 
Nijam sipai
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jayesh for pointers.

and i am also looking at some examples/exercises on spring to get well versed with it all the concepts.

I know theoretically much about the spring concepts but i feel getting hands-on with problem makes much difference.

do you think spring.io docs should be good to try out ? please do suggest if any links you thinks useful.


Thanks,
Nijam
 
Jayesh A Lalwani
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Spring.io docs are the official docs from Spring. I prefer to use them because Spring has gone through so many changes that if you look for information online, 10 places will give you 12 answers for the same question. Spring.io tells you what the recommended solution is based on the version of Spring that you are using.

The problem with spring.io reference is that it doesn't give a complete example. You cannot copy-paste-tweak. A lot of blogs like mykong have complete examples that you can copy-paste, but sometimes he posts annoyingly wrong solutions.
 
crispy bacon. crispy tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!