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 encapsulation and unit testing to validate our code as we develop the Domain hexagon components.
We will cover the following topics in this chapter:
- Bootstrapping the Domain hexagon
- Understanding the problem domain ...