Useful Tips
- Builder focuses on constructing a complex object step by step. Abstract Factory emphasizes a family of product objects (either simple or complex). Builder returns the product as a final step, but as far as the Abstract Factory is concerned, the product gets returned immediately.
- Builder often builds a Composite.
- Often, designs start out using Factory Method (less complicated, more customizable, subclasses proliferate) and evolve toward Abstract Factory, Prototype, or Builder (more flexible, more complex) as the designer discovers where more flexibility is needed.
- Sometimes creational patterns are complementary: Builder can use one of the other patterns to implement which components are built. Abstract Factory, Builder, and Prototype can use Singleton in their implementations.
- Builders are good candidates for a fluent interface.
Read more about this topic: Builder Pattern
Famous quotes containing the word tips:
“Romeo. Lady, by yonder blessed moon I vow,
That tips with silver all these fruit tree tops
Juliet. O, swear not by the moon, th inconstant moon,
That monthly changes in her circled orb,
Lest that thy love prove likewise variable.”
—William Shakespeare (15641616)
“A new idea is rarely born like Venus attended by graces
More commonly its modeled of baling wire and acne.
More commonly it wheezes and tips over.”
—Marge Piercy (b. 1936)