Wrapper
ELI5 — The Vibe Check
A wrapper is code that wraps around other code to give it a nicer, simpler, or different interface — like putting a phone case on a phone. The phone still works the same, but now it's easier to hold. API wrappers simplify complex APIs, library wrappers add features or change the interface, and sometimes you wrap things just to make them testable.
Real Talk
A wrapper is a design pattern where code encapsulates another component to modify its interface, add functionality, or simplify usage. Common types include API client wrappers (simplifying HTTP calls), adapter wrappers (interface compatibility), and decorator wrappers (adding behavior). Wrappers add indirection but improve abstraction and enable testing via dependency injection.
When You'll Hear This
"We built a wrapper around the Stripe API to match our domain model." / "The wrapper adds logging and retry logic around every database call."
Related Terms
Adapter Pattern
You're in Europe with a US charger. You need an adapter. In code, your app expects a PaymentProcessor with a .pay() method, but the new Stripe SDK uses .
Decorator Pattern
You have a Coffee object. You want Coffee with Milk. Coffee with Sugar. Coffee with Milk and Sugar. With inheritance you'd need four classes.
Facade Pattern
Facade Pattern is like the front desk at a hotel.
SDK (SDK)
An SDK is a toolkit a company gives you so you can build stuff that works with their platform.
Shim
A shim is a thin piece of code that makes old things work with new things (or vice versa).