Adapter Pattern
Updated 2026-07-30
Summary
In software engineering, the adapter pattern is a software design pattern (also known as wrapper, an alternative naming shared with the decorator pattern) that allows the interface of an existing class to be used as another interface. It is often used to make existing classes work with others withou…
Definition
Convert the interface of a class into another interface that clients expect. This allows classes that would otherwise not work together due to incompatible interfaces to work together. Scaffold use: A bridge to the legacy world. When you (a new idea/technology) enter an old system, do not try to forcibly change the old system. Make an 'adapter' (translation layer/compatibility layer), wrapping yourself into a shape the old system can understand, and integrate subtly.
Introduction
How to use
A bridge to the legacy world. When you (a new idea/technology) enter an old system, do not try to forcibly change the old system. Make an 'adapter' (translation layer/compatibility layer), wrapping yourself into a shape the old system can understand, and integrate subtly.
Mechanism
Convert the interface of a class into another interface that clients expect, enabling incompatible classes to collaborate.
Practice
In progress 0/1Practice this model in one real situation:
Cases
- Integrating legacy system interfaces with new APIs.
Common pitfalls
- Overusing adapters may mask deep incompatibilities.
Sources
Source support: Explicit
References currently contain only Wikipedia links; primary sources still need review.
- en.wikipedia.orghttps://en.wikipedia.org/wiki/Adapter_patternverified
account_treeGenealogyexpand_more
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.
RELATED MODELS