Which pattern provides a single simplified entry point to a complex subsystem (e.g. VideoConverter.convert(file, "mp4") hiding codecs, buffers, muxers)?
Options
- Facade (Correct option)
- Proxy
- Adapter
- 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.