Chapter 1. The Factory Pattern