Hurray…My first book Java Persistence with MyBatis3 is published. I would like to thank Packt Publishers for giving me this opportunity to write on my favorite framework MyBatis.
For most of the software applications data persistence is a key and important aspect. In Java land we have many ways of implementing persistence layer starting from low level JDBC to fancy ORM frameworks.
JDBC is too low level API and needs to write a lot of boilerplate code. On the other hand we have full fledged ORM frameworks like JPA(Hibernate, EclipseLink etc) which hides the complexity of working with SQL directly by letting developers work with Objects and generate SQL based on the RDBMS(Dialect) being used. But each approach has its own set of pros and cons, there is no one size fits all solutions. There are many large applications that are using Hibernate successfully and there are many other applications which got screwed up by using Hibernate/JPA incorrectly. It is not the problem with JPA/Hibernate, it is simply because JPA/Hibernate may not be best fit for those applications or developers don’t understood them properly.