Sunday, March 21, 2010

Abstract Factory

Provides interface for creating families or related or dependent objects without specifying their concrete classes

Benefits:
  • Isolates concrete classes from client
  • Allows for exchanging product families easy
  • Promotes consistency among products
When to use:
  • The system should be independent of how its products are created.
  • The system should be configured with one of multiple families of products, like MS, Apple, Linux
  • The family or related objects are designed to be used together, and this constraint must be enforced, this is the key point of Abstract Factory.
  • You want to reveal only the interfaces, not the implementation of a library

    No comments:

    Post a Comment