2

Wrapping Business Rules inside Domain Hexagon

In the previous chapter, we learned about the Domain as the first hexagon in hexagonal architecture. By being the innermost hexagon, the Domain does not depend on any code from the Application and Framework hexagons. Also, we make all the other hexagons depend on the Domain to conduct their operations. This kind of arrangement confers the Domain hexagon a degree of responsibility and relevance far higher than other hexagons. We employ such an arrangement because it is in the Domain where we group all the business rules and data that most represent the problem we try to solve.

Among the techniques to model a problem domain, Domain-Driven Design (DDD) is widely adopted in projects that emphasize ...

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.