Separating the artifacts of a complex object from its representation allows the same build process to create different representations.
Builder (Builder) role: An abstract interface is given to standardize the construction of each component of a Product object. Generally speaking, this interface is independent of the business logic of the application. The direct creation of product objects in a pattern is the specific builder (concretebuilder) role. The concrete builder class must implement the method required by this interface: one is the construction method and the other is the result return method.
The specific builder (concrete Builder) Role: This role is a tightly related class of applications that create product instances under application calls. The main tasks of this role include: implementing the interface provided by the builder role, step-by-step through the process of creating the product instance, and providing an instance of the product upon completion of the construction process.
Mentor (Director) Role: The class that holds the role calls the concrete builder role to create the Product object. Directors do not have specific knowledge of the product category, the specific knowledge of the actual product class is the specific builder object.
Product role: A product is a complex object in construction.
To 2.0 System.Text with the. NET Framework. StringBuilder as an example