java中的orm框架
巴扎黑
巴扎黑 2017-04-17 13:03:43
0
13
1214

很久没做java后台了,都不知道java发展的怎么样了。
现在ORM框架主流还是hibernate嘛,

ibtais和mybatis哪个用的多点。请大牛指点
补充:mybatis是ibatis的升级,是不是说明ibatis被淘汰了,我司好像还是用ibtais,我想从这两个中选择一个学习,大神们请推荐。

巴扎黑
巴扎黑

reply all(13)
Ty80

hibernate and ibtas (mybatis) emerged to solve different problems.

Hibernate looks at the database from the perspective of objects. All tables at the database level are objects in Hibernate's view. If the objects are objects, they will naturally have one-to-many, one-to-one, etc. relationships. Hibernate completely encapsulates database-level operations at the object level. So it is a complete ORM tool. The biggest benefit is that developers can complete database-level operations with a small amount of code, which greatly improves development efficiency and does not need to write a lot of JDBC code.

But after all, the database cannot just be viewed as an object. It has its own organization method and its own indexing mechanism. When your database reaches a certain level, hibernate will be very difficult, because when using objects, Organizing the relationship between objects will make the SQL mapped to the database level very complicated.

Precisely when this kind of complexity is not what the database execution engine expects, it will lead to various slow queries. Therefore, a semi-automatic method like ibtas (mybatis) appeared later to solve the performance problem. The interaction with the database level is still through specific SQL, but it provides a mechanism to simplify the development workload, that is, the work of writing JDBC.

The current mainstream is basically ibtas (mybatis), especially for Internet applications, hibernate is too heavy!

Ty80

Use SpringJdbc, it is more flexible than hibernate. I really don’t know what is good about ibatis. Its functions can be realized by SpringJdbc.

大家讲道理

The hibernate and mybatis above are too heavyweight.

You can check out nutz for a one-stop solution. Very lightweight.

小葫芦

The conclusion is as shown in the figure.
But in any case, as far as using the ORM framework is concerned, you can rest assured to learn without worrying about time costs, and it will not take up too much time.

大家讲道理

hibernate is probably still mainstream, mybatis is an upgrade of ibatis, it is naturally easier to use, and it also supports annotations!

小葫芦

mybatis is the result of the entire ibatis development team migrating from apache to github. So it's direct inheritance and upgrade.

PHPzhong

Spring Data JPA is also a good choice

小葫芦

Hibernate is too heavy and is not recommended for novices to learn. In addition, there are a lot of concepts in it that cannot be manipulated by novices. It is recommended that you learn mybatis, which is easy to get started and semi-automatic ORM. It requires writing sql, and you can also learn and become proficient in sql. You can also get more; Ningwai, don’t ask whether it is mainstream or not. Mybatis and hibernate are chosen based on their characteristics, performance, development efficiency, and staff proficiency in the project (it seems that Gaopingfa’s websites now use mybatis (more), Ningwai, your company uses ibatis in its projects, then you should learn more about it, and then understand its upgrade mybatis (actually this is just the name changed by ibatis after it moved out of apache, and everything is inherited and improved. )

刘奇

mybatis, convenient for SQL optimization and low learning cost

巴扎黑

Mybatis is just the second name of ibatis. It is recommended to use mybatis, a lightweight ORM framework with high execution efficiency and easy to write various SQL

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template