In this chapter, we will learn about several patterns related to software reusability. As you may recall from Chapter 1, Design Patterns and Related Principles, reusability is one of the four software quality objectives that is required for building large-scale applications. Nobody wants to reinvent the wheel. The ability to reuse an existing software component saves both time and energy—an overall humanity gain! The patterns in this chapter are proven techniques that can help us improve application design, reuse existing code, and reduce overall code size.
In this chapter, we will cover the following topics:
- The delegation pattern
- The holy traits pattern
- The parametric type pattern