December 2016
Beginner to intermediate
238 pages
6h 10m
English
© Kelt Dockins 2017
Kelt Dockins, Design Patterns in PHP and Laravel, 10.1007/978-1-4842-2451-9_4
Kelt Dockins1
(1)Dolph, Arkansas, USA
$> git checkout builderSeparate the construction of a complex object from its representation so that the same construction process can create different representations.1
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 ...
Read now
Unlock full access