Spring DATA Neo4j - Introduction



Spring is Open Source Framework to develop Enterprise Java Based applications very easily. It is written in Java Language.

Spring Framework has provide the following modules to deal with DAO layer of a Java Based applications

  • Spring JDBC

  • Spring ORM

  • Spring DATA

If we observe any Java based n-tier application, we typically find the following layers.

Neo4j CQL Tutorial

Here DAO (Data Access Object) layer is responsible to implement Database Operations.

We need to implement two set of Artifacts for each and every Entity (Say one Database Table).

For Example:-

If we have a PROFILE table in our Database, then we need to provide one Profile Entity class (POJO). Then we need to provide one DAO interface and one DAO implementations class.

Here we need to choose either Spring JDBC or Spring ORM to implement these Artifacts.

Neo4j CQL Tutorial

In the same way, we need to provide two Artifacts for each and every Entity. If our Project size increases, it also increases creation and maintenance of more Artifacts in DAO Layer.

Drawbacks of Spring JDBC/Spring ORM Modules:

  • Lots of boiler plate code to perform simple Database operations

  • Increases maintenance of lots of DAO Layer Artifacts

  • Increases Development time in implementing lots of DAO Layer Artifacts

Why we need Spring DATA Module?

To resolve all of the above problems, we need to use Spring DATA module.

Advantages of Spring DATA Module:

  • Eliminates boiler plate code in DAO Layer

  • Less Artifacts in DAO Layer

  • Easy to Develop and maintenance

  • Improvement Development process

Spring DATA Module Features

  • Supports of XML based Entity mapping

  • Supports of Annotations based Entity mapping

  • Supports Pagination

  • Supports Transactions

  • Less DAO Layer Artifacts - Implementation of Repositories

Spring DATA Neo4j Module has same advantages and features as mentioned above.

Additional Features of Spring DATA Neo4j Module:

  • Supports Neo4j Property Graph module

  • Supports Neo4j Lucence Indexing

  • Supports Neo4j CQL

  • Neo4jTemplate

Advertisements