Using Domain-Driven Design to shape the Domain hexagon
When employing the hexagonal architecture to design a system’s code structure, we cannot stress enough how important it is to first implement the Domain hexagon. It’s the Domain hexagon that sets the tone for the development of the entire application.
As long as you keep the code in the Domain hexagon that purely expresses the problem domain—the code that does not merge business concerns with technology ones—you are on the right path to ensuring the encapsulation level that favors a more change-tolerant design. The technique you’ll use to develop the Domain hexagon should not be your main concern at this stage—instead, your aim should be to create a Domain hexagon that is focused on the system’s purpose, rather than the technology you might use to implement it. So, you can develop the Domain hexagon using your own set of principles, or you can borrow ideas from others who have...