xii | Preface
Who This Book Is For
We wanted to develop a book for intermediate to advanced ActionScript 3.0 users.
Unlike some languages, such as Java, where the readers are likely to have computer
science or computer engineering degrees, most ActionScript 3.0 users are likely to
have learned ActionScript in developmental stages using Flash. As a result, their
backgrounds are far more varied, and the programming base less definite. We’re sure
that a number of ActionScript programmers have computer science or related back-
grounds, and much of the introductory materials in the first chapter will be redun-
dant. Likewise, we’re certain that some readers on the lower end of the intermediate
level are learning object-oriented programming at the same time that they’re trying to
pick up design patterns; they may have little or no formal training in programming.
Given the range of ActionScript programming backgrounds, we’re bound to be too
difficult for some and too simplistic for others. However, this book’s overall goal is
to explain how to use different design patterns. We targeted whom we considered
intermediate level ActionScript developers. We’ve provided everything the intermedi-
ate level developer will need to move to the advanced level. For the advanced user,
we provide explanations and examples of how to use design patterns with Action-
Script 3.0.
How This Book Is Organized
The book’s organization reflects the topic organization found inDesign Patterns Ele-
ments of Reusable Object-Oriented Softwareby Erich Gamma, Richard Helm, Ralph
Johnson, and John Vlissides (Addison-Wesley, 1995).
The first part contains Chapter 1, which is an introduction to design patterns. We
added an introductory section for readers with minimal object-oriented program-
ming experience. More advanced users may want to skip the review of OOP, but go
over the materials on design patterns.
Part I,Constant Change
Chapter 1,Object-Oriented Programming, Design Patterns, and ActionScript 3.
Parts II, III and, IV are the three major parts of the book. They examine fundamental
design patterns, and organize the patterns intocreational,structuralandbehavioral
categories. Representative design patterns are included in each part, but we didn’t
include every single design pattern from the book by Gamma and his associates.
Part II,Creational Patterns
Chapter 2,Factory Method Pattern
Chapter 3,Singleton Pattern