Chapter 8. Adapter

Nikola Tesla invented the AC electric power system back in the 19th century. He probably couldn't imagine that we would have the annoying problem of plugging an electric device made for the United States into a wall outlet in Europe without any adapter. Picture me holding an electric razor and looking at a wall outlet in the bathroom of my hotel room in Europe but missing an adapter. "What now?" "Should I buy a new razor here?" "But then when I bring it back to the United States, I will need an adapter for it too."

In object-oriented software design, sometimes you want to reuse some useful and well-tested classes in other new areas of an application. But it's quite common that new features require new interfaces and they don't ...

Get Pro Objective-C Design Patterns for iOS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.