| Source | Contribution |
|---|---|
| Kent Beck - Implementation Patterns | Patterns at the class and method level: Composed Method, Intention-Revealing Name, Value Object, Guard Clause, Collecting Parameter, Method Object, Command/Query separation. Beck's central thesis is that code communicates to future readers, and patterns are the vocabulary for doing that well. |
| Martin Fowler - Refactoring | A catalog of transformations that move code toward clean implementation patterns. Extract Method, Introduce Explaining Variable, Replace Conditional with Polymorphism, Replace Temp with Query, and Null Object are among the most frequently applied. Fowler shows that patterns are destinations; refactoring is the path. |
| Bertrand Meyer - Object-Oriented Software Construction | Origin of Command-Query Separation: a method either returns a value (query) or changes state (command), not both. This single principle prevents a class of subtle bugs. |
| GoF - Design Patterns | Template Method and Null Object, covered here at the implementation level, are formally GoF patterns. See the Design Patterns story for a fuller treatment of GoF patterns. |
| Pattern | Chapter | Problem addressed |
|---|---|---|
| Composed Method | 1 | Methods that do too much at too many levels of abstraction. |
| Intention-Revealing Name | 1 | Names that describe implementation rather than purpose. |
| Explaining Variable | 1 | Complex expressions that cannot be understood without tracing values. |
| Guard Clause | 1 | Deep nesting caused by handling the normal case before the error cases. |
| Value Object | 2 | Objects representing quantities where identity is irrelevant. |
| Null Object | 2 | Null/nil checks scattered across callers of a method. |
| Collecting Parameter | 2 | Results assembled through recursive or multi-step traversal. |
| Method Object | 2 | Complex methods with many local variables and multiple conceptual steps. |
| Command-Query Separation | 3 | Methods that both return values and cause side effects. |
| Replace Conditional with Polymorphism | 3 | Type-dispatching conditionals repeated across multiple methods. |
| Delegation over Inheritance | 3 | Subclasses that differ primarily in behavior, not in type identity. |
| Template Method | 3 | Algorithms with a stable skeleton and interchangeable steps. |
| Resource | Description |
|---|---|
| Kent Beck - Implementation Patterns | The primary source for this story. Covers class, state, and behavior patterns at the method and expression level. |
| Martin Fowler - Refactoring | Catalog of refactoring transformations that move code toward cleaner implementation patterns. Second edition (2018) uses JavaScript. |
| Refactoring Guru - Catalog | Illustrated refactoring catalog cross-referencing Fowler's techniques with examples in multiple languages. |
| Design Patterns story | GoF design patterns - the structural, behavioral, and creational patterns that operate at a higher level than implementation patterns. |