6

Building the Domain Hexagon

In previous chapters, we had the opportunity to employ Domain-Driven Design (DDD) techniques, such as entities and value objects, to create a domain model. However, until now, we haven’t touched on organizing packages, classes, and modules to fit the hexagonal architecture purpose.

The Domain hexagon is the place to start developing a hexagonal application. Based on the domain, we derive all other hexagons. We can say that the Domain hexagon is the brain of hexagonal systems because the core fundamental business logic resides in such a hexagon.

So, in this chapter, we will start to explore how to structure a hexagonal application project from the bottom using a Java module approach. This will help us ensure better ...

Get Designing Hexagonal Architecture with Java - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.