<<< Builder Sample II, Pizza Restaurant     Index     Factory Method >>>

13. Difference between Builder and Factory Pattern

  • Abstract Factory Pattern:

  • Emphasises object creation operations for families of related objects,

    • where each family is a set classes derived from a common base.

  • Each object is returned immediately as a result of one call.

  • Builder pattern:

  • Focuses on constructing a complex object
    step by step.

  • Formulates the logic of how to put together a complex object:

    • Builder object encapsulates configuration of the complex object.

    • Director object knows the protocol of using the Builder,

      • where the protocol defines all logical steps required to build the complex object.


<<< Builder Sample II, Pizza Restaurant     Index     Factory Method >>>