June 2018
Intermediate to advanced
280 pages
7h 46m
English
In some implementations of the builder pattern, the Director class can be removed. In our class example, the logic it encapsulates is quite simple, so in that case we don't really need a director. In this case, the simplified builder pattern would look like this:

The code that was implemented in the Director class is simply moved to the Client. This change is not recommended when the Builder and Product classes are too complex or when the builder is used to build an object from a stream of data.
Read now
Unlock full access