Reference · 16 terms
Glossary
Every short form used across the series. Inside a lesson, hover or tap any dotted term to see the same entry in place.
Foundations
- composition over inheritanceComposition over inheritance
- Build behaviour by combining small objects that each do one job, instead of deep class hierarchies.Lesson 0 →
- SOLIDSOLID
- Five design rules: single responsibility, open/closed, Liskov substitution, interface segregation and dependency inversion.Lesson 0 →
Creational patterns
- builderBuilder pattern
- Build a complex object step by step with named methods, then produce the final object.Lesson 1 →
- dependency injectionDependency injection
- Pass an object's dependencies in from outside instead of creating them inside, so they can be swapped in tests.Lesson 1 →
- factoryFactory pattern
- A function or class whose job is to create objects, so callers do not decide which concrete class to build.Lesson 1 →
- singletonSingleton
- A class with exactly one shared instance. Easy to misuse because it hides global state.Lesson 1 →
Structural patterns
- adapterAdapter pattern
- Wrap an object so it fits an interface the caller expects.Lesson 2 →
- decoratorDecorator pattern
- Wrap an object to add behaviour while keeping the same interface.Lesson 2 →
- facadeFacade pattern
- One simple interface in front of a group of more complex parts.Lesson 2 →
- proxyProxy pattern
- A stand-in with the same interface that controls access to another object, for example to cache, check or log calls.Lesson 2 →
Behavioural patterns
- chain of responsibilityChain of responsibility
- Pass a request along a list of handlers until one handles it. Express middleware works this way.Lesson 3 →
- commandCommand pattern
- Turn a request into an object so you can queue, log or undo it.Lesson 3 →
- observerObserver pattern
- Subscribers register with a subject and are told when it changes.Lesson 3 →
- state patternState pattern
- An object changes its behaviour when its internal state changes, usually with a clear table of allowed transitions.Lesson 3 →
- strategyStrategy pattern
- Put interchangeable algorithms behind one interface so you can swap them at run time.Lesson 3 →
Anti-patterns
- god objectGod object
- One class that knows and does too much. A common anti-pattern.Lesson 4 →