Spring Data JDBC - Domain Driven Design



What is Domain Driven Design (DDD)

Domain−Driven Design is a book by Eric Evans. The Spring Data JDBC repository concept has been taken from DDD. To be more specific it has been inspired by the rules of aggregate design, another concept from the same book. The rules of aggregate design says that

All the different entities (which have strong coupling) should be grouped together which in turn called aggregates, and the top entity of the aggregate is called the aggregate root. Each aggregate has exactly one aggregate root which could be one of the entities of the aggregate.

In short we should have a repository that should follow the rules of aggregate design of DDD i.e. a repository per aggregate root. We will try to understand this concept in detail in the relationship section of this tutorial.

Advertisements