Software Design Knowledge Base

Master Software
Design Patterns

From foundational GoF patterns to enterprise architecture — comprehensive guides with production-ready code examples in 11 programming languages.

23GoF Patterns
14Enterprise Patterns
5SOLID Principles
11Languages

Explore by Category

Code examples inPythonTypeScriptJavaJavaScriptC#GoRustPHPDartSwiftKotlin

GoF Design Patterns

Search and filter all 23 classic patterns

Creational

Factory Method

Defines an interface for creating an object, but lets subclasses decide which class to instantiate.

Read more →
Creational

Abstract Factory

Provides an interface for creating families of related or dependent objects without specifying their concrete classes.

Read more →
Creational

Singleton

Ensures that a class has only one instance and provides a global point of access to it.

Read more →
Creational

Builder

Separates the construction of a complex object from its representation.

Read more →
Structural

Bridge

Splits a large class or set of closely related classes into two separate hierarchies.

Read more →
Structural

Proxy

Provides a surrogate or placeholder for another object to control access to it.

Read more →
Behavioral

Command

Encapsulates a request as an object, allowing parameterization and queuing.

Read more →
Behavioral

Observer

Defines a one-to-many dependency between objects for automatic notifications.

Read more →
Behavioral

State

Allows an object to alter its behavior when its internal state changes.

Read more →