The last pattern from this chapter, builder, helps with creating complex objects or their representations. The general idea behind the pattern is to separate such a process into two parts: one gives instructions to an abstract builder interface, and another converts the instructions into a concrete representation. This allows us to create multiple representations from the same construction process.
Builder
The builder pattern is similar to an automated coffee/tea machine that always follows the same build process: put a cup on the tray, insert the correct beverage into the system, flow hot water through the system into the cup, and beep at the end. While the build process is always the same, the end result depends on a concrete implementation ...
Get Mastering Delphi Programming: A Complete Reference Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.