10.12.2012 Views

ActionScript 3.0 Design Patterns.pdf - VideoTutorials-bg.com

ActionScript 3.0 Design Patterns.pdf - VideoTutorials-bg.com

ActionScript 3.0 Design Patterns.pdf - VideoTutorials-bg.com

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Using More Than One Pattern<br />

PART V<br />

V.Multiple <strong>Patterns</strong><br />

A multiple personality is in a certain sense normal.<br />

—George Herbert Mead (Describing what is normal for<br />

programmers who attempt to use multiple design<br />

patterns.)<br />

Language can be abstracted, language can be used as<br />

a very beautiful code in poetry, the nuances and the<br />

multiple meanings of things, it has a music to it. It has<br />

so many things in it. It is also reduced from prose and<br />

therefore can be both mathematical, or very, very<br />

abstract.<br />

—Jim Jarmusch<br />

For every disciplined effort there is a multiple reward.<br />

—Jim Rohn<br />

One is sorry one could not have taken both branches<br />

of the road. But we were not allotted multiple selves.<br />

—Gore Vidal (Describing the process in mutually<br />

exclusive radio buttons.)<br />

The two chapters in this last part present two designs that implement more than a<br />

single design pattern. First, we examine the Model View Controller (MVC). The<br />

MVC uses the Observer pattern (Chapter 8) in the Model to hold the data, the View<br />

entity uses the Composite pattern (Chapter 6) for representation of the model state,<br />

and the Controller makes use of the Strategy pattern (Chapter 11) for the user interaction.<br />

Our implementation of the MVC in <strong>ActionScript</strong> <strong>3.0</strong> reflects the design patterns<br />

suggested by the Gang of Four. Other options are possible in the MVC, such as<br />

including Factory and Decorator design patterns.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!