| Category | Concern |
|---|---|
| Behavioral | How objects communicate, distribute responsibility, and exchange information. Patterns: Strategy, Observer, Command, Iterator, Template Method, Chain of Responsibility, and others. |
| Creational | How objects are created, decoupling object creation from the code that uses them. Patterns: Factory Method, Abstract Factory, Builder, Prototype, Singleton. |
| Structural | How objects and classes are composed into larger structures. Patterns: Decorator, Adapter, Composite, Proxy, Facade, Bridge, Flyweight. |
| Language | Key idioms for pattern expression |
|---|---|
| Rust | Traits and trait objects replace abstract base classes. Enums with associated data replace class hierarchies for sum types. Closures replace single-method strategy objects. The ownership model eliminates most Observer pitfalls around object lifetime. |
| C++ |
Abstract base classes with virtual functions for classic patterns.
Templates and type parameters for compile-time Strategy.
Lambdas and |
| C# | Interfaces and delegates cover most behavioral patterns. Events and delegates are the native form of Observer. Extension methods provide Decorator-like behavior without subclassing. Generics replace many use cases that required Prototype in early Java. |
| Python |
Duck typing: any object implementing the right methods works as a strategy.
First-class functions replace most single-method classes.
The |
| Resource | Description |
|---|---|
| Refactoring Guru - Design Patterns | Illustrated catalog of all GoF patterns with examples in multiple languages. |
| OODesign.com | Pattern descriptions with UML class diagrams and concise explanations. |
| SWDevStory: Structural Patterns | Architectural structural patterns - monolithic, data flow, factored. |
| SWDevStory: Advanced Patterns | Type erasure and plugin architectural patterns. |