The term "Gang of Four" (GoF) refers to the authors of the book "Design Patterns: Elements of Reusable Object-Oriented Software." This book, often considered a seminal work in software engineering, was written by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides — thus the "Gang of Four."
The book introduced and described 23 design patterns that have proven to be useful solutions to common software design problems. These design patterns are divided into three categories: creational, structural, and behavioral.
Creational Patterns are focused on handling object creation mechanisms, trying to create objects in a manner suitable to the situation:
Structural Patterns deal with object composition and typically identify simple ways to realize relationships between different objects:
Behavioral Patterns are specifically concerned with communication between objects:
Chain of Responsibility
These patterns provide solutions that help reduce the complexity in code and improve code maintainability, flexibility, and robustness. Each pattern describes a problem that occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice.