adapter pattern
An adapter translates an existing interface into the interface its caller expects.
Use this when An application must support another vendor or an incompatible external API.
without the term
“We might switch from S3 to another storage provider. Can you set it up so the app talks to our own interface and only one file knows about the specific vendor?”
with the term · How do you ask a model for adapter pattern?
Add an adapter for this provider behind the existing contract. Run the same behavior checks against both provider implementations.
What is adapter pattern?
The adapter converts between the application's interface and an external API, including data shapes and errors, so the rest of the code never sees the vendor's types.
Why does adapter pattern matter when vibe coding?
SDK-specific response and error types can spread across business logic.
How do you do adapter pattern?
Define the application contract and translate external data and failures at the boundary.
What goes wrong with adapter pattern?
Returning the raw vendor client to every caller for convenience.