This chapter provided an overview of four behavioral patterns. All of the patterns in this group help you to organize complex systems into well-behaved maintainable structures.
We opened up with a null object pattern. This simple pattern allows us to remove if assigned(object) tests from the code and replace them with a special do-nothing null version of the object. Although the concept behind this pattern is simple, the pattern itself can be very useful.
Next, we looked at the template method pattern. This pattern explains how to use object-oriented programming to design extensible and adaptable algorithms. We also demonstrated how we can solve such problems by using the concepts that were developed after the Gang of Four times.
The command pattern helps with organizing action-based programming. It tells us how to systematically convert actions into objects and how to...