Skip to content

Files

Latest commit

 

History

History

BuilderPattern

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Builder Design Pattern

Separate the construction of a complex object from its representation, allowing the same construction process to create various representations.

πŸ’‘ Useful when you need to create objects that have many different working parts that need to all come together to create one single object.

πŸ‘ Advantages

  • Allows you to vary a product's internal representation
  • Encapsulates code for construction and representation
  • Provides control over steps of construction process

πŸ‘Ž Disadvantages

  • It does create more code
  • Too many constructors to maintain
  • Error prone because many fields has same type