DSA Factory
Free Design patterns lessonsDesign patterns · Stage 1 · Structuring objects · Step 1

Adapter and facade

Two wrappers with different jobs: making an incompatible interface fit, and hiding a complicated subsystem behind a simple one. About 12 minutes.

Quick check

What is the most important difference between an adapter and a facade?

  1. AAn adapter converts an interface to the expected one; a facade offers a simpler interface to a subsystem
  2. BA facade works only with interfaces
  3. CA facade is faster
Show the answer

An adapter converts an interface to the expected one; a facade offers a simpler interface to a subsystem. Different problems, similar structure.

Lock it in

4 questions on this idea

Short questions that apply the idea to new cases: trace it, work out a number, put steps in order. A wrong answer explains itself.

Answer them in your browserFree account, no card. Your progress is saved, and the idea comes back in a quick review later.
Sign up free to solve