← Course map

GO LEARNING PATH · 5 LESSONS

Patterns: creation

Factory Method, Abstract Factory, Builder, Prototype and Singleton.

  1. Factory Method: supply the creation step

    Vary product creation without duplicating the algorithm that uses it.

    3 min · Worked lesson

  2. Abstract Factory: compatible product families

    Create related products through one selected family.

    3 min · Worked lesson

  3. Builder: assemble then validate

    Represent staged construction without making invalid results usable.

    3 min · Worked lesson

  4. Prototype: copy a useful starting value

    Choose shallow or deep copying according to ownership.

    3 min · Worked lesson

  5. Singleton: once does not mean global mutable state

    Understand one-instance intent and choose an explicit lifetime.

    3 min · Worked lesson