Comparing the different architectures
What is the best architecture we can use? Is there even right or wrong here? How do we digest all of that?
So, we saw how to combine modular and multi-layer architecture and emphasize each architecture’s advantage. The same goes for the hexagonal architecture – let’s pull out the different principles we’ve learned:
- Use protocols to decouple the communication with the external services
- Make the domain model the core of the app
These principles are relevant not only to hexagonal architecture but also to other architectures.
Let’s try to compare the different architectures using several important metrics.
By separation of concerns
Separation of concerns is an important principle in project structuring, and all three architectures implement it well.
However, each separates the concerns in a slightly different way. For example, the multi-layered architecture separations are clear and...