Builder Pattern - stop writing constructors with 12 parameters. This is the cleanest way to construct complex objects step by step.
What’s in the video (5m 4s)
- 0:00 Builder Pattern
- 0:45 Simpler Factory Pattern vs Builder Pattern
- 1:22 What is Telescoping Constructor?
- 2:33 How Builder Pattern Works?
- 3:26 When to Use Builder Pattern?
- 4:01 When to Avoid Builder Pattern?
Resources
- Full Design Patterns series: YouTube playlist
- Previous episode: https://youtu.be/FVD9_CtcwdI
- Next episode: https://youtu.be/m2-Hhw5jgA0
- Source notes / code: https://github.com/learnwithmanoj/design-patterns-simplified/blob/main/06-creational-builder.md
For more in this series, visit the #design-patterns tag page or jump to the channel uploads list for everything else.