Builder Design Pattern

Builder design pattern belongs to creational design pattern family and this pattern is used to hide the complexity of object creation or the intent of the Builder design pattern is to separate the construction of a complex object from its representation.

Example: When you buy a car, you have to go to showroom of the car. But the actual development (assembly) happens in somewhere in the factory of that car manufacturer. So here we are separating the concern of developing and selling the car. Here the showroom is more like a representation layer. Both things (development and selling) are happening at different places and the actual buyer is not really concerned about the where the car actually is being manufactured. He/She wants the end goal i.e. The Car.

More real life examples are followings:

Hope this clears your doubt!!

One thought on “Builder Design Pattern

Comments are closed.