Posts

Showing posts with the label gang of four

Behavioral Design Patterns: Chain of Responsibility

Intention The Chain of Responsibility pattern is defined as follows in the Gang of Four book: Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain until an object handles it. Structure Explain how it works using UML diagram. Example Explain the section of the GitHub repository.

Design Patterns: An Introduction

I'm refreshing my memory about software design patterns by watching some videos and taking some notes. I thought I would document them here for future posterity. These are the design patterns as defined by the Gang Of Four (GoF) in their seminal book "Design Patterns: Elements of Reusable Object-Oriented Software" and can be found on Amazon (non-affiliated link) . Some of the things I'll be posting will be related to the various categories of design patterns (as defined by the GoF): Creational, Structural and Behavioral. They are broken down like so: Creational Abstract Factory Builder Factory Method Prototype Singleton Structural Adapter Bridge Composite Decorator Facade Flyweight Proxy Behavioral Chain of Responsibility Command Interpreter Iterator Mediator Memento Observer State Strategy Template Method Visitor I will try to break each of these patterns into sections: Intent, Structure, Example. For those following along, I'll have the code for these examples ...