
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
349
Chapter 15
CHAPTER 15
Introduction to Design Patterns
We’ve covered a lot of territory, both theoretical and practical throughout the first
two parts of this book. By now you should have a firm grasp on ActionScript 2.0 syn-
tax and fundamentals, as well as higher-order concepts such as classes, inheritance,
composition, and exception handling, plus housekeeping details such as packages,
class libraries, and components. So you’re well on your way to being a skilled object-
oriented programmer. But you may be wondering how to design an application.
You’re in luck. This chapter is our first stop on our journey through object-oriented
design. By the end of Part III, you should be comfortable architecting relationships
between classes to address a variety of common scenarios. With time, you’ll learn to
expand and apply this knowledge to other problems.
At the beginning of every program is a problem, probably one that other program-
mers have faced before. A design pattern is a widely accepted description, with a rec-
ommended solution, of a design or architectural problem in object-oriented
programming. Given a specific requirement, a design pattern describes, in general
terms, how to structure interacting classes to meet that requirement. In other words,
the pattern provides a general ...