Builder Pattern
In this lesson, we will go over the builder pattern in detail with the aid of a coding example.
We'll cover the following...
What is the builder pattern?
The builder pattern is a type of creational pattern that helps in building complex objects using simpler objects. It provides a flexible and step-by-step approach towards making these objects. It also keeps the representation and process of creation shielded.
Consider the example of a restaurant that has to build a meal for its customers. The building process has various stages:
-
The customer comes in and places an orders for a meal to the cashier
-
The cashier forwards the order to the crew member (the builder) who ...