Low-Level Design
System Design › Low-Level DesignState Pattern in Java (with Example)
The State pattern explained: an object changes behaviour as its internal state changes by delegating to a state object, with each state its own class driving transitions — the clean way to build a state machine. State vs Strategy, code, UML.
System Design › Low-Level DesignObserver Pattern in Java (with Example)
The Observer pattern explained: a subject notifies a list of observers automatically when its state changes — the pub/sub, event-listener, and MVC pattern. Push vs pull, Java code, UML, when to use.
System Design › Low-Level DesignStrategy Pattern in Java (with Example)
The Strategy pattern explained: put each interchangeable algorithm in its own class behind a common interface and swap it at runtime, replacing giant if/else chains. Java code, UML, Strategy vs State, when to use.
System Design › Low-Level DesignComposite Pattern in Java (Tree Structures)
The Composite pattern explained: treat individual objects and groups of objects uniformly through one interface, for tree / part-whole structures like file systems and UI trees. Java code, UML, when to use.
System Design › Low-Level DesignProxy Pattern in Java (Virtual, Protection, Remote)
The Proxy pattern explained: a stand-in that controls access to a real object — virtual (lazy load), protection (access control), remote, and caching proxies. Proxy vs Decorator, Java code, and real examples.
System Design › Low-Level DesignFacade Pattern in Java (with Example)
The Facade pattern explained: put one simple method in front of a complex subsystem of many classes, hiding the mess and decoupling callers. Facade vs Adapter, Java code, UML, and when to use it.
System Design › Low-Level DesignDecorator Pattern in Java (with Example)
The Decorator pattern explained: add behaviour to an object at runtime by wrapping it, stacking features like milk and sugar on coffee — instead of a subclass explosion. Java I/O streams, code, UML, when to use.
System Design › Low-Level DesignAdapter Pattern in Java (with Example)
The Adapter pattern explained: wrap a class with an incompatible interface so it works with the interface your code expects — like a travel plug adapter. Integrating third-party/legacy code, with Java code and UML.
System Design › Low-Level DesignPrototype Pattern in Java (Shallow vs Deep Copy)
The Prototype pattern explained: create new objects by cloning an existing one instead of expensive construction. The shallow-vs-deep-copy gotcha, Java Cloneable, and when to use it. With code and UML.