GO LEARNING PATH · 7 LESSONS
Patterns: composition
Adapter, Bridge, Composite, Decorator, Facade, Flyweight and Proxy.
Adapter: translate one contract into another
Keep conversion details at the boundary that needs them.
3 min · Worked lesson
Bridge: two independent dimensions of variation
Compose an abstraction with a separately variable implementation.
3 min · Worked lesson
Composite: treat leaves and groups uniformly
Define recursive behavior while guarding the shape of the structure.
3 min · Worked lesson
Decorator: add behavior while preserving the contract
Wrap a small operation instead of constructing a type hierarchy.
3 min · Worked lesson
Facade: one useful entry point over a subsystem
Simplify orchestration without pretending several effects are atomic.
3 min · Worked lesson
Flyweight: share immutable intrinsic state
Separate reusable data from per-use context before optimizing memory.
3 min · Worked lesson
Proxy: control access to an existing operation
Make caching or lazy access preserve the caller’s expectations.
3 min · Worked lesson