Low Level DesignDesign patterns
Design patterns for interviews
The design patterns that keep showing up in low level design interviews, each taught through real examples with what it solves, what it costs and when a plain if is better.
12 topics.
- 01FoundationReadStrategySwap an algorithm without touching the class that uses it.
- 02FoundationReadFactory method and abstract factoryCentralize object creation so callers stop depending on concrete types.
- 03FoundationReadObserverNotify many listeners without the sender knowing who they are.
- 04FoundationReadBuilderConstruct objects with many optional parts without a telescoping constructor.
- 05FoundationReadSingletonThe most misused pattern, and the few places it is right.
- 06Mid-levelReadDecoratorAdd behavior by wrapping, not by subclassing every combination.
- 07Mid-levelReadAdapter and facadeHide awkward interfaces behind the one your code wants.
- 08Mid-levelReadStateReplace a wall of if-else on status with objects per state.
- 09Mid-levelReadCommandTurn actions into objects so you can queue, log and undo them.
- 10Mid-levelReadCompositeTreat a tree of objects and a single object the same way.
- 11Mid-levelReadTemplate methodFix the steps of an algorithm and let subclasses fill in the details.
- 12Mid-levelReadChain of responsibilityPass a request along handlers until one takes it.
More in Low Level Design
The designbeyondcode digest, every Saturday
New deep dives, interview tips and site news in one short email. Free. Leave with one click.
We never sell or share your email. We only use it to send this newsletter.