Pages

October 13, 2020

10/13/2020: Design Patterns: Builder

TIL: Builder Design Pattern

------------------------------------------------------------------------------------------

The Builder design pattern is another in the Creation category. While Abstract Factory creates different varieties within a family of objects (like furniture sets that come in different styles), Builder uses interfaces to create different varieties of the same object (like cars). The Builder pattern prevents creation of objects with a large number of optional parameters, or extension of a base class into subclasses covering all available options.

Again, each class or function should do one thing and one thing only. If you find you are implementing the same steps over and over in different ways, consider using a Builder interface.


------------------------------------------------------------------------------------------

Today's accomplishments:
17K+ steps
Research making sofa slip covers
Research dog clicker / whistle training
Finish Thinkful Javascript course
Design Patterns: Builder
Dishes
Make carpet shampoo
Shampoo basement rug
Dry laundry
Finish watching Critical Role campaign 2 episode 89
Stretch

No comments: