Hantsy Bai talks about the new Spring Data project


Since Spring 1.x, in the core framework, Spring provided a generic DaoSupport API to simplify the data operations, and now a new Spring Data project was born which provides a modern way for data operations. DaoSupport and Template API The legacy DaoSupport and Template API tries to simplify data access of DBRMS, it supports Hibernate, Jdbc, iBatis and JDO etc. In the new Spring, JDO support is deprecated and removed, and the third party project MyBatis(the successor of iBatis) hands over the Spring data access support. Spring provides lots of encapsulation for the Jdbc operations, and tries to free developers from the tedious Jdbc APIs. Till now, Jdbc support is still considered valuable when Jdbc is chosen in your project. Besides this, Spring provides a abstraction framework for transaction management, which delegates transaction operations to the one which is relied upon in your project, such as Jdbc transaction, JPA transaction, JTA etc. Benefited from AOP support in Spring, Spring provides some simple approaches to declare the transaction boundary. If you are using Hibernate and JPA, it is better to use the native API which only needs a simple bean registration in Spring configuration. In the further posts I will introduce the DaoSupport API and Template API. Spring Data Thing was changed now days, we are entering a big data era. Spring Data project tries to provide a more generic abstraction for different datastore, including RDBMS support, such as Jdbc, JPA etc, and NoSQL support, such as MongoDB, Neo4j etc. The core API is Repository interface(provided in Spring Data Commons sub project), which utilizes AspectJ and Spring AOP framework, and provides effective data query by method name convention. It is the base of all other certain sub projects. You can consult the Spring Data project page for more details. I will provide some posts about the JPA and Mongo sub projects. Read the Full Article Here.  

Keywords: