Jonas Partner shows us how SDN is used with POJOs for movie-lovers’ and social networks, where the data is also stored with a Neo4j database


The Spring Data Neo4j (SDN) framework was created to make life easier for developers like yourself who need to work with POJO-based domain models with data backed by Neo4j. It aims to deal with, and shield you, from all the low-level plumbing and mapping logic surrounding reading and writing domain entities into and out of Neo4j, freeing you to focus on the important aspect of writing the code that makes you (or your company) money—namely, the business logic. In this article, based on chapter 8 of Neo4j in Action, the authors explain domain modeling with SDN.

In this article, we’ll be stepping through a process to show you how SDN can be used to transform POJOs to represent the various entities within your movie-lovers’ social network, where the data is also stored in your trusty Neo4j database.

Your journey will be as follows:

  1. Define a standard POJO object model to represent your domain.
  2. See what is required by SDN to transform these POJOs into entities backed by Neo4j.
  3. Dig a little deeper into various elements of SDN modeling, including:
    • Modeling node entities
    • Modeling relationship entities
    • Modeling relationships between node entities