java - 关于Hibernate与Mybatis的区别
阿神
阿神 2017-04-17 17:48:46
0
1
343

在J2EE领域,数据持久层这块主流的框架有Hibernate与Mybatis,二者的主要区别体现在哪里?在生产环节,二者主要适用于什么场景呢???

阿神
阿神

闭关修行中......

reply all(1)
刘奇

I think the principle is whichever one is easier to use

I am also a novice, so I will just talk about my personal understanding. I welcome guidance from experts

h is more heavyweight and complex than m. It is easy to get started but difficult to master, and it is difficult to master. When I first started learning, I thought it would be better not to even write SQL. Later I found out that the disadvantage of this is that it cannot be performance tuned. If you let h execute SQL, it can be done, but it goes against his original intention. Moreover, it is not very comfortable for a table to correspond to a large amount of XML.
m is a little lighter, you can directly write SQL (template), it is easy to get started, it is decoupled, and it feels very cool.
From my shallow perspective, it seems that m is more popular than h now.
Finallyyou will know after using it

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!