intermediate

Facade

Expose a narrow workflow-oriented API over complex subsystems so callers do not depend on internal orchestration details.

Facade exposes a narrow, workflow-oriented API over a complex subsystem so callers avoid orchestrating many low-level steps. It is not an excuse to hide bad design forever—it coordinates existing parts for a specific use case such as checkout, onboarding, or media upload.

On interviews: distinguish Facade from Adapter and from a true domain service. Explain when facades improve ergonomics without hiding necessary detail.

Common pitfalls: god facades that know every subsystem; facades returning opaque blobs; bypassing facades in half the codebase.

The trade-off is flexibility versus complexity—know when the simpler path is enough.

Checklist:

  • Design facade methods around user journeys.
  • Keep subsystem boundaries visible to maintainers.
  • Document what the facade does not guarantee.
  • Add tests at facade level for critical flows.