Skip to content

Facade

A pattern that wraps a complex subsystem with a simple top-level API to improve usability.

  • When hiding a game boot sequence behind one method.
  • When internal module details should be hidden from the outside.
  • Facade
  • Subsystem
  • Client

The code below is a simplified Unity example based on the scenario described above.

public sealed class GameStartupFacade
{
private readonly SaveSystem saveSystem = new();
private readonly AudioSystem audioSystem = new();
private readonly UiSystem uiSystem = new();
public void StartGame()
{
saveSystem.Load();
audioSystem.Initialize();
uiSystem.OpenLobby();
}
}
  • It clarifies module boundaries and reduces coupling.
  • Features can be extended or integrated without modifying existing code.
  • If wrapper layers become too deep, debugging gets harder.
  • Interfaces should stay small so responsibility boundaries do not blur.

This shows the flow where complex subsystem calls are simplified into a single entry point.

Facade Flow