Low-level design

Creational patterns

How objects get made. 5 lessons where the diagrams draw themselves, one class and one message at a time, with the theory and the code beside them.

  • 5 lessons
  • Animated diagrams

Sign in with Google or GitHub and you land straight on this page. DSA comes with the all labs plan and every ChaiCode batch.

5 lessons, each with diagrams that draw themselves.

In this module

  • Guarantee a class has exactly ONE instance and give the whole program a single point of access to it.
  • Define a method for creating an object, but let SUBCLASSES decide which concrete class to instantiate, so the creator code never names a product directly.
  • Create whole FAMILIES of related objects (a Button + a Checkbox that match) through one factory, guaranteeing the pieces always belong together.
  • Construct a complex object step by step with a readable, chainable API, instead of a monster constructor full of flags.
  • Create new objects by CLONING an existing, fully-configured instance, instead of building from scratch with new.

More low-level design

Start Creational patterns

Sign in and the first lesson opens with its diagram ready to play.

DSA comes with the all labs plan and every ChaiCode batch.