Adapter

Alternative Classes with Different Interfaces

Email and text reminders do one job with two different method shapes, so every caller branches and the retry loop exists twice. Learn to line up the signatures, share a parent, and adapt what you can't change.

November 26, 20269 minutes

Adapter

Twelve call sites print receipts, and the new printer only speaks bytes. Learn how one Adapter class lets your code keep its own interface, and how it differs from Decorator, Proxy and Facade.

November 25, 20268 minutes