Summary of the design patterns explained in the book Design Patterns in Ruby, where Russ Olsen explains and adapts to Ruby 14 of the original 23 GoF design patterns.
- Template Method: redefines certain steps of an algorithm without changing the algorithm's structure
- Strategy: varies part of an algorithm at runtime
- Observer: helps building a highly integrated system, maintainable and avoids coupling between classes
- Composite: builds a hierarchy of tree objects and interacts with all them the same way
- Iterator: provides a way to access a collection of sub-objects without exposing the underlaying representation
- Command: performs some specific task without having any information about the receiver of the request
- Adapter: helps two incompatible interfaces to work together
- Proxy: allows us having more control over how and when we access to a certain object
- Decorator: vary the responsibilities of an object adding some features
- Singleton: have a single instance of certain class across the application
- Factory: create objects without having to specify the exact class of the object that will be created
- Builder: create complex objects that are hard to configure.