Questions and answers
Take a look at the following questions and answers regarding this chapter’s content:
- Can we add the hexagonal architecture later?
Not always. We can refactor it. The challenge can be too much code that directly depends on details of external systems. If that’s the starting point, this refactoring will be challenging. There will be a lot of rework to do. This implies that some degree of up-front design and architectural discussion is required before we start work.
- Is the hexagonal architecture specific to OOP?
No. It is a way of organizing dependencies in our code. It can be applied to OOP, FP, procedural programming, or anything else – so long as those dependencies are managed correctly.
- When should we not use the hexagonal architecture?
When we have no real logic in our domain model. This is common for very small CRUD microservices that typically frontend a database table. With no logic to isolate...