Repaso
Español
Design & PracticesIntermediateDP-21

Which pattern provides a single simplified entry point to a complex subsystem (e.g. VideoConverter.convert(file, "mp4") hiding codecs, buffers, muxers)?

Options

  1. Facade (Correct option)
  2. Proxy
  3. Adapter
  4. Flyweight

Answer

Facade

Why

A Facade is a simple front door to a complicated set of classes. Clients call one easy method; the facade coordinates the many internal steps.

Difference with Adapter: an Adapter converts one interface to another; a Facade simplifies a whole subsystem.

Remember

Facade = one simple front door to a complex system.

Key terms

Practice this question in Repaso