Enterprise ApplicationDevelopment with Ext JSand Spring
上QQ阅读APP看书,第一时间看更新

Understanding the reasons for using JPA

JPA is a productivity tool that allows developers to focus on business rather than write low-level SQL and JDBC codes. It completely eliminates the need to map a Java ResultSet to Java domain objects and greatly reduces the amount of effort required to produce a usable and functional application. A JPA-based application will be easier to maintain, test, and enhance. More importantly, the quality of your application code will significantly increase and the domain entities will become self-documenting.

From personal experience, I estimate the time taken to write a traditional SQL application (without JPA, coding the CRUD SQL statements directly) to be in the order of 10-15 times longer than with the JPA approach. This translates into an enormous saving of time and effort for enterprise applications where cost saving can amount to many man-months of work. During the lifecycle of an application, when maintenance, bug fixes, and enhancements are taken into account, cost savings alone may be the difference between success and failure.