3
Chapter 1
CHAPTER 1
Object-Oriented Programming, Design
Patterns, and ActionScript 3.0 1
Let it be your constant method to look into the design
of people’s actions, and see what they would be at, as
often as it is practicable; and to make this custom the
more significant, practice it first upon yourself.
—Marcus Aurelius
The life history of the individual is first and foremost
an accommodation to the patterns and standards
traditionally handed down in his community.
—Ruth Benedict
At the lowest cognitive level, they are processes of
experiencing, or, to speak more generally, processes of
intuiting that grasp the object in the original.
—Edmund Husserl
The Pleasure of Doing Something Well
The idea of design patterns is to take a set of patterns and solve recurrent problems.
At the same time (even in the same breath), the patterns reflect good object-oriented
programming (OOP) practices. So, we cannot separate OOP from design patterns,
nor would we want to do so.
In answering the question of why bother with design patterns, we are really dealing
with the question of why bother with OOP. The standard response to both design
patterns and OOP often points to working with a team of programmers and speak-
ing the same language. Further, it’s easier to deal with the complexities involved with
programming tasks requiring a division of labor for a large project using an object
metaphor and practices.
In addition to coordinating large projects, programmers use both OOP and design
patterns to deal with change. One key, important element, of design patterns is that
they make changing a program much easier. The bigger a program and the more
time you’ve spent developing it, the greater the consequences in making a change to