Adapters
Where the outside world meets the application boundary.
Adapters translate between external protocols (HTTP, database drivers, message queues) and the port interfaces the domain defines. The domain never knows which adapter is plugged in.
Context
- Ports — The interfaces adapters implement
- Hexagonal Architecture — The pattern that separates domain from infrastructure
Questions
When does an adapter become complex enough to deserve its own domain?
- What signals tell you an adapter is doing too much translation?
- How do you test adapters without the external system running?