The Abstract Factory Pattern

The Abstract Factory pattern provides an interface for creating families of related products while concealing the object-instantiation process. Figure 6-3 shows the class diagram.

Image

Figure 6-3. Abstract Factory pattern class diagram

This pattern has the following parts:

  • Abstract product
  • Concrete product
  • Abstract creator
  • Concrete creator
  • Client

The pattern's benefits are as follows:

  • Uses abstracts factories of like interfaces
  • Enables the interchanging of product families

It also has this drawback:

  • Introducing a new product is difficult.

A Comprehensive Look

The Abstract Factory pattern is an extension of the ...

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.