Introduces design patterns and introduces the null object pattern, symptoms indicating it should be applied, a demonstration, and examples in popular Ruby gems
2. What is a Design Pattern?
● A reusable solution to a common problem
● Kent Beck and Ward Cunningham applied to
computer science in 1987
● Defined in Design Patterns: Elements of
Reusable Object-Oriented Software by GoF
3. Null Object Pattern
● Categorized as behavioral pattern
● Similar to the strategy, or state pattern
● Polymorphism
● null interface that can be used by a
collaborator
4. When To Use
● Symptoms include null checks on properties
● Conditional logic to display an object
● Use of a placeholder