Domain-driven design introduces the concepts of Aggregate, AggregateRoot, and Repository. If one takes these concepts seriously, certain habits we picked up while fighting working with JPA become unacceptable. Even more, a substantial part of the complexity of JPA seems to become superfluous. The result will be performant, scalable, and maintainable.
A drawback of this approach is that we might have to fight our database administrator. But you can’t have it all, can you?
As it turns out, Spring Data JDBC supports this approach rather well.
In this talk, I’ll present how to design an object model the DDD way, why this might be a good idea, and how to build a persistence layer for it backed by Spring Data JDBC.
And I’ll even figuratively bring some candy to pacify the Database Admins.