← Course map

GO LEARNING PATH · 7 LESSONS

Patterns: composition

Adapter, Bridge, Composite, Decorator, Facade, Flyweight and Proxy.

  1. Adapter: translate one contract into another

    Keep conversion details at the boundary that needs them.

    3 min · Worked lesson

  2. Bridge: two independent dimensions of variation

    Compose an abstraction with a separately variable implementation.

    3 min · Worked lesson

  3. Composite: treat leaves and groups uniformly

    Define recursive behavior while guarding the shape of the structure.

    3 min · Worked lesson

  4. Decorator: add behavior while preserving the contract

    Wrap a small operation instead of constructing a type hierarchy.

    3 min · Worked lesson

  5. Facade: one useful entry point over a subsystem

    Simplify orchestration without pretending several effects are atomic.

    3 min · Worked lesson

  6. Flyweight: share immutable intrinsic state

    Separate reusable data from per-use context before optimizing memory.

    3 min · Worked lesson

  7. Proxy: control access to an existing operation

    Make caching or lazy access preserve the caller’s expectations.

    3 min · Worked lesson