Hexagonal / Ports & Adapters
ApplicationApplication core with ports and adapters for the outside world
Principles
Isolated corePorts define interfacesAdapters implement portsTestability without infrastructure
When to use
When you need to change infrastructure, testing is important, enterprise apps
When not to use
Simple apps, basic CRUD
Pros and Cons
Ventajas
- + Testing without infrastructure
- + Easily change adapters
- + Pure and testable core
Desventajas
- - Additional abstraction
- - More interfaces to maintain