ActionScript 3.0 Design Patterns

(Chris Devlin) #1
Index | 503

E


ECOOP, 470
EmailCheck.as, 418
encapsulate what varies, 337
encapsulated algorithms, 401
encapsulating variation, 400
encapsulation, 15–24, 248
purpose, 16
enter frame event handler, 188
Escape.as, 167
execute( ) method, 250, 251
extensiblilty planning, 57–60


F


factories, 66
Factory Method Minimalist.fla, 69
Factory Method pattern, 63, 65–68
color printing example, 80–83
clients, 83
new creator classes, 81
new product classes, 80
parallel class hierarchies, 83
concrete creator classes, 100
creator classes, 66
key OOP concepts, 84
minimal example, 69–74
clients, 72
creator classes, 71
product classes, 70
product classes, hiding, 73
object creation and reduction of
coupling, 84
parameterized factory methods, 79
integrating, 81
print shop example, 74–79
clients, 78
creator classes (print centers), 76
extension, 78
product classes (print jobs), 75
product classes, 66
Sprite factory, 84–90
clients, 89
creator classes (shape creators), 87
product classes (shape widgets), 85
summary, 100
vertical shooter game, 90–100
clients, 100
creator classes, 97–99
product classes, 91–97
factory methods, 67
FallDown.as, 409


FancyPrintCenter.as, 79
FashionShow.as, 145
favor object composition over class
inheritance, 49–51, 56, 285, 288
FilledCircleWidget.as, 87
FilledShapeCreator.as, 89
FilledSquareWidget.as, 87
Flash CS3, xiv
document class, 69
MovieClip and Button objects, making
classes from, 7
Flash Media Server 2 (see FMS2)
Flash paper doll, 141–147
component class, 141
concrete classes, 142
concrete component class, 142
concrete decorator classes, 143
Decorator class for dressing dolls, 141
implementing the paper doll
decorator, 145–147
Flex 2, xiv, xv
FlightPlan.as, 353
FMS2 (Flash Media Server 2), xiv, xv
State pattern and, 383

G
Gamma, Erich, xii
Gang of Four (GoF), xiv
generic concrete decoration, 152
Geostationary Satellite Server, 443
getInstance( ) function, 108
GoF (Gang of Four), xiv
GPS.as, 169
GPSView.as, 465
granularity, 59, 414
Guitar.as, 28

H
HasBase .as, 50
Hat.as, 144
Head.as, 226
HeatedSeat.as, 168
heavenly virtues, 153–156
Heliotis, James, 470
Helm, Richard, xii
HeroCannonBall.as, 93
HeroShip.as, 96
HeroWeapon.as, 98
HighVolPrintCenter.as, 77
Hollywood Principle, 333, 337
Free download pdf