Criticizing the Java persistence framework
The original article is well written. For details, see http://fromapitosolution.blogspot.com/2008/12/criticism-of-java-persistence.html.
The brief translation is as follows:
Most applicationsProgramThey are all data-driven and need to be able to access tables and modify data. Although the persistence framework still has many problems, we still need it when developing applications. Otherwise, SQLCodeWill be distributed to every corner of the application, resulting in ugly and manageability of the application.
The persistence framework establishes a database layer and separates the logic related to it. The Java Persistence Solution has two main branches:
1) java standard solutions: JDBC, EJB, and JDO.
2) Other ORM ing frameworks: hibernate, toplink, enterprise object framework, and ibatis.
Let's ask a basic question. Everyone should ask themselves, "Are there other simpler and more powerful solutions ?" Many developers are trying to solve this problem. Sun and Sun are trying to simplify EJB. In fact, this is why new frameworks are emerging.
Ibrahim Levent describes 23 errors that are prone to Java Persistence frameworks:
1) The problem of Object-link matching is not resolved
2) The framework cannot meet the application architecture requirements
3) XML abuse
4) database metadata not used
5) The object query language is an incorrect route.
6) do not throw an SQL exception. It is not an enemy.
7) multi-data source dilemma
8) Why are persistent objects so weak?
9) Poor Transaction Management
10) heavy object Cache
11) Incorrect lock Method
12) Persistence APIs can simplify
13) bytecode Control Problems
14) the ID (OID) column of the object not required in the table. The primary key column already exists.
15) inheritance is meaningless
16) the primary key and foreign key are created with the new class, resulting in many unnecessary classes.
17) Lack of cluster support
18) Missing database events
19) Authorization authentication is missing
20) Lack of Dynamic Rules
21) the object model tool for Automatic Code Generation is missing
22) audit trail missing
23) The persistence object debugging tool is missing
ArticleGood. For more information, see the original article.