|
| 1 | += GoF Design Patterns |
| 2 | +:categories: design-principles |
| 3 | +:roles: software-developer, software-architect, educator |
| 4 | +:proponents: Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides |
| 5 | +:related: solid-principles, fowler-patterns, clean-architecture |
| 6 | +:tags: design-patterns, gang-of-four, oop, creational, structural, behavioral |
| 7 | + |
| 8 | +[%collapsible] |
| 9 | +==== |
| 10 | +Full Name:: Gang of Four Design Patterns |
| 11 | + |
| 12 | +Also known as:: Design Patterns, Gang of Four Patterns |
| 13 | + |
| 14 | +[discrete] |
| 15 | +== *Core Concepts*: |
| 16 | + |
| 17 | +Creational Patterns:: Abstract Factory, Builder, Factory Method, Prototype, Singleton — object creation mechanisms |
| 18 | + |
| 19 | +Structural Patterns:: Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy — object composition and relationships |
| 20 | + |
| 21 | +Behavioral Patterns:: Chain of Responsibility, Command, Interpreter, Iterator, Mediator, Memento, Observer, State, Strategy, Template Method, Visitor — object interaction and responsibility |
| 22 | + |
| 23 | +Pattern language:: Shared vocabulary for communicating recurring design problems and proven solutions |
| 24 | + |
| 25 | +Composition over inheritance:: Favor object composition for flexibility over rigid class hierarchies |
| 26 | + |
| 27 | +Program to an interface:: Depend on abstractions rather than concrete implementations |
| 28 | + |
| 29 | +Design for change:: Identify what varies in your design and encapsulate it |
| 30 | + |
| 31 | + |
| 32 | +Key Proponents:: Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides ("Design Patterns: Elements of Reusable Object-Oriented Software", 1994) |
| 33 | + |
| 34 | +[discrete] |
| 35 | +== *When to Use*: |
| 36 | + |
| 37 | +* Object-oriented design requiring proven solutions to recurring problems |
| 38 | +* Communicating design decisions using a shared vocabulary |
| 39 | +* Teaching object-oriented design principles through concrete examples |
| 40 | +* Refactoring code to increase flexibility and reusability |
| 41 | + |
| 42 | +[discrete] |
| 43 | +== *Related Anchors*: |
| 44 | + |
| 45 | +* <<solid-principles,SOLID Principles>> - Design principles that GoF patterns help implement |
| 46 | +* <<fowler-patterns,Fowler Patterns>> - Enterprise application architecture patterns (complementary scope) |
| 47 | +* <<clean-architecture,Clean Architecture>> - Architectural style leveraging GoF principles |
| 48 | +==== |
0 commit comments