This is a natural progression of the Factory Method (Design Pattern) but applies the Strategy (Design Pattern).

Benefits:

  • Allows polymorphic creation of objects
  • Nicely encapsulates object creation – client depends on abstraction not implementation
  • Groups creation logic for multiple inter-dependent classes
  • Change one line of code to replace a set of classes or even switch dynamically at runtime

Disadvantages:

  • Slightly more indirect code
  • Only covers creation