Home  >  Q&A  >  body text

ssh - Java ORM框架现在推荐使用哪个?

问题

现在打算自己弄一个小web练练手,当然了,要有一定实用性。
现在选ORM框架的时候遇到了一些疑问,还望有经验的小伙伴们给些建议和意见。

详细

今年刚刚毕业,到公司后接触了两三个项目,有两个项目ORM框架用的mybatis,一个用的是hibernate,但是最近hibernate那个项目要重构产品化了。也就意味着项目组接下来的项目不会再使用hibernate了。而我自己在使用hibernate的时候也遇到了比较多的问题,比如自动的关联会产生一些问题,并且自动的关联会在一定的程度上影响性能。当然了,简单的CURD还是很喜欢hibernate的。毕竟一个SQL都不用写了。mybits更加灵活但是SQL全靠手敲,像我这种刚毕业的菜鸟可能写出的SQL效率就不是很好了。但是还挺喜欢的,毕竟自由了很多,也不会查出一些不必要的数据(hibernate一查就是一堆。。)

说了这么多就是想知道各位在各自的领域使用较多或者用的比较好的ORM框架都是什么?hibernate和mybits或其他ORM你们更倾向哪个。

PS:其他的前端啊,或者一些好的框架的选型也可以推荐推荐,任何方面的都可以,现在就我一个人在开发着玩,抱着学习的态度在给自己敲代码。

PHPzPHPz2714 days ago312

reply all(5)I'll reply

  • 大家讲道理

    大家讲道理2017-04-18 10:29:14

    • Recommended: SpringData

    • In fact, complex statements can also be written using Query in JPA, and of course MyBatis can also be used. One is object-oriented and the other is command-oriented, it all depends on personal preference.

    reply
    0
  • 迷茫

    迷茫2017-04-18 10:29:14

    jfinal is very easy to use, lightweight mvc, everything you need is available!

    reply
    0
  • 高洛峰

    高洛峰2017-04-18 10:29:14

    I am using mybatis now. I think it is very convenient to write and practice SQL. By the way, what kind of small web project do you want to start? I have just graduated and want to start a small web project myself to learn.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-18 10:29:14

    mybatis is the most used and can directly write sql. Sometimes spring data jpa is also used, which is the implementation of jpa and the secondary encapsulation of hibernate. It is well encapsulated and is very convenient to use in conjunction with spring. The amount of code written by yourself is small and the development efficiency is high

    reply
    0
  • 高洛峰

    高洛峰2017-04-18 10:29:14

    I think springjdbc combined with template engine is enough and the performance is high

    reply
    0
  • Cancelreply