3 ms·
I've used hexagonal architecture extensively. All of the typically claimed benefits are true. It's great for enforcing separation of concerns, and for permittin
by oftenwrong 6y ago
I've used hexagonal architecture extensively. All of the typically claimed benefits are true. It's great for enforcing separation of concerns, and for permitting easy swapping of components. Great for mocking components in tests. Great for long-life software.
Most materials present hexagonal architecture in a very one-sided way, however. They don't discuss the downsides.
For example, every connection point between components requires an abstract API layer. This is a significant overhead compared to just having components call into eachother. In the long run, this is worth the effort. In the short term, there is no benefit.
Additionally, while it is true that the APIs can be flexibly hooked up to any implementation, there is still plenty of room for bad assumptions to creep into those APIs. When you have many adapters for a given port, those assumptions are entrenched, and are difficult to change.