Infographic: the Adapter pattern converts different external languages into one common model, the Strategy pattern decides which adapter runs — Controller to Use case to the MenuAdapter port, then on to XFirmMenuAdapter (X API, JSON) and YFirmMenuAdapter (Y API, XML)
Aug 8, 2026 · 8 min

Adapter and Strategy: Keeping External Services Outside the Domain

How to integrate with multiple external services without letting any of them leak into your business logic: one port, multiple adapters, and two ways to choose which adapter should run.