Skip to content

Adapter

Stable ID: pattern.adapter
Kind: design-pattern
Status: stable
Source: skill/references/design-patterns/adapter.md

Purpose

Translate an external or incompatible interface into a boundary owned by the consuming system.

Use when

  • An external API or legacy interface should not leak through domain code.
  • Several callers need one stable translation boundary.

Avoid when

  • The wrapper merely renames every method one-for-one.
  • The external interface is already the intended public contract.

Applicability

  • Languages: any, python, q-kdbplus, cpp, rust, dart-flutter, typescript
  • Related entries: decision.repository-vs-adapter, component.plugin-system