Back to Low-Level Design
🧱
Phase 3

Structural Design Patterns

Patterns for composing classes and objects into larger structures. These patterns make it easier to assemble systems from independent parts while keeping them decoupled.

1

Adapter Pattern: Making Incompatible Interfaces Work Together

How to make two incompatible interfaces work together without touching either one, using object adapters, class adapters, and two-way adapters.

lldstructuraladapter
2

Facade Pattern: A Simple Entry Point to a Complex Subsystem

How to give callers one convenient entry point into a complex subsystem, without hiding it, and where Facade turns into a leaky-abstraction anti-pattern.

lldstructuralfacade
3

Decorator Pattern: Adding Behavior Without Subclassing

How to attach new behavior to individual objects dynamically, the way java.io streams do, without subclass explosion — and how to chain decorators correctly.

lldstructuraldecorator
4

Proxy Pattern: Controlling Access to an Object

Virtual, protection, and remote proxies for controlling access to an object — lazy loading, authorization checks, and network boundaries — plus Java's dynamic proxy mechanism.

lldstructuralproxy
5

Bridge Pattern: Decoupling Abstraction from Implementation

How to let an abstraction and its implementation vary independently, using composition instead of a combinatorial inheritance hierarchy.

lldstructuralbridge
6

Composite Pattern: Treating Trees and Leaves Uniformly

How to compose objects into tree structures representing part-whole hierarchies, so clients can treat individual objects and compositions of objects through one interface.

lldstructuralcomposite
7

Flyweight Pattern: Sharing State to Cut Memory Usage

How to minimize memory usage by sharing intrinsic state across millions of similar objects, using a flyweight factory, and when the added complexity is actually worth it.

lldstructuralflyweight