Skip to content
Preptima
mediumConceptDesignMidSenior

Adapter, decorator and facade - what concrete problem does each one solve, and where would reaching for it be over-engineering?

7 min readUpdated 2026-08-15

Answer

Short answer

Adapter converts a type you do not own into the interface your code already speaks. Decorator adds behaviour while keeping the same interface, so wrappers stack. Facade gives callers one narrow entry point into a subsystem.

Keep structural patterns explicit in the answer because that is the concept the interviewer is actually trying to test. A good structural patterns explanation names the trade-off, the failure mode, and the evidence you would use before choosing. Use structural patterns once more at the decision point so the answer reads as judgement rather than a detached example.

Keep structural patterns explicit in the answer because that is the concept the interviewer is actually trying to test. A good structural patterns explanation names the trade-off, the failure mode, and the evidence you would use before choosing.

Was this answer helpful?

Likely follow-ups

  • How do you keep a stack of decorators debuggable when a stack trace is ten frames of wrappers?
  • What breaks when a decorator wraps an object whose identity or equals contract callers rely on?
  • Where would you put a retry - a decorator, the adapter, or the caller?
  • If a facade grows to forty methods, what has gone wrong and what do you do?

Related questions

Further reading

Related Topics