Key Points
- The
new
keyword may decrease the flexibility of your code as well as prevent internal reuse. - The Factory Method pattern relies on inheritance to localize preparation and creational logic.
- The Abstract Factory pattern bundles families of related or dependent objects.
- The Singleton pattern allows for extension.
- The Builder pattern varies the internal representation of its product.
- A singleton should remain extensible.
- A pattern can become the client of other patterns.
- Simple Factory isn't the Factory Method pattern or the Singleton pattern—it's not even a pattern.
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.