Forums Register Login

Difference between Hibernate and MyBatis

+Pie Number of slices to send: Send
Hi Friends

I recently started learning Hibernate.

I want to know whether Hibernate is better over MyBatis or vice - versa.

Could any one suggest me any Book on Hibernate.
+Pie Number of slices to send: Send
I have no idea about MyBatis but for books: "Java Persistence with Hibernate" is the best book you can read to learn Hibernate in depth.
+Pie Number of slices to send: Send
 

Avinash Haridasu wrote:Hi Friends

I recently started learning Hibernate.

I want to know whether Hibernate is better over MyBatis or vice - versa.

Could any one suggest me any Book on Hibernate.



If you don't want to read the whole thing try this:
http://www.youtube.com/watch?v=Yv2xctJxE-w

This guy is great! The series is 30 something tutorials up to 15 min max each. He covers everything in good details. After this tutorials you will be good enough to read the documentation by your self to figure out the rest that you don't know.
Just hit subscribe to thank the guy.

As far as the MyBatis goes, I gave it a look and it quite similar to Hibernate. Some names of the annotations are different but they do the same thing. I wouldn't say it easier than Hibernate, but that is just my thought. maybe somebody that has experience with Mybatis should say something
+Pie Number of slices to send: Send
If you trying to decide on which way to go - hibernate or mybatis. I would say it depends - in which stage of the project you are in. If you are in control of the Class model - starting from the scratch, then you could very well design your classes in line with Hibernate principles. If you are trying to do one off thing in existing application which is following a different db framework, then I would say using mybatis would be very helpful. Also Mybatis is a nobrainer in terms of maintenance, you could directly work/concentrate on the SQL queries - banking on your SQL knowledge. It would be very easy for a new joinee in the team to pickup mybatis when compared to hibernate. While for Hibernate, there is a learning curve involved. Especially if there are some complex joins involved in the application, then Hibernate is going to be quite a challenge though. With mybatis you could come up with the exact query in any query analyzer and use it directly in the mapper file.
Won't you be my neighbor? - Fred Rogers. tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 8225 times.
Similar Threads
JSP/Servlets
How MyBatis is different from Hibernate?
learning about SAX Parser and the DOM Parsers
Struts2 with MyBatis
when to go for SpringMVC and when to go for Struts.How to make a choice?what are advantage of both?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 09:35:55.