Real-world examples
In our everyday life, the builder design pattern is used in fast-food restaurants. The same procedure is always used to prepare a burger and the packaging (box and paper bag), even if there are many different kinds of burgers (classic, cheeseburger, and more) and different packages (small-sized box, medium-sized box, and so forth). The difference between a classic burger and a cheeseburger is in the representation, and not in the construction procedure. In this case, the director is the cashier who gives the crew instructions about what needs to be prepared, and the builder is the person from the crew that takes care of a specific order.
We can also find software examples, as follows:
- The HTML example that was mentioned at the beginning of the chapter is actually used by
django-widgy
(https://wid.gy/), a third-party tree editor for Django that can be used as a content management system (CMS). Thedjango-widgy
editor contains a page builder that can be...