The Builder Pattern
The Builder pattern separates the construction steps from the product to offer flexibility among product representations. Figure 6-4 shows the class diagram.
Figure 6-4. Builder pattern class diagram
This pattern has the following parts:
- Abstract product
- Concrete product
- Abstract builder
- Concrete builder
- Abstract director
- Concrete director
- Client
The pattern's benefits are as follows:
- Very high level of control over object creation
- Enables varying products from the same algorithms
- Conceals the construction process from the client
A Comprehensive Look
The Builder pattern is concerned with building objects in a manner ...
Get AdvancED ActionScript 3.0: Design Patterns 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.