Chapter 5. Factory and Template Method Patterns

<feature><title>In This Chapter</title> </feature>

When creating groups of related classes, it’s important to maintain those relationships during object creation. One way to do this is with the Factory Method design pattern. The Factory Method pattern is a creational pattern and solves the problem of creating objects without specifying a concrete type. This is most often used in abstract classes that define a method for object creation. Subclasses can then override this method to define the specific object to be created.

The Factory Method is most often used in conjunction with another pattern called the Template Method. To better understand ...

Get Advanced ActionScript 3 with Design Patterns now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.