$> git checkout builder
Intent
Separate the construction of a complex object from its representation so that the same construction process can create different representations.1
Applications
A builder is good for creating complex products. As discussed in the last chapter, a product can be anything. All the creational patterns focus on producing products. Some products are just naturally complex, though. So in that case, you can delegate the building process to a director and builder. More about that in just a second. A real-life example of the builder pattern is the construction of a car. An assembly line ...