Low-level design

SOLID principles

The five laws of OO design. 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

  • A class should have ONE reason to change. Bundle one responsibility per class; split it the moment a class starts juggling many.
  • Software should be OPEN for extension but CLOSED for modification, add new behaviour by adding code, not by editing code that already works.
  • A subclass must be usable ANYWHERE its parent is, without surprising the caller. If substituting it breaks behaviour, the inheritance is a lie.
  • No client should be forced to depend on methods it doesn’t use. Prefer many small, role-specific interfaces over one fat one.
  • High-level policy shouldn’t depend on low-level details. Point BOTH at an abstraction, and watch the dependency arrow flip.

More low-level design

Start SOLID principles

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

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