15.1 Bring on the Patterns

 <  Day Day Up  >  

The remainder of this book studies four design patterns that are particularly applicable to the problems that arise in Flash, showing how to use them to structure sections of an ActionScript 2.0 application. First we'll study two canonical design patterns, Observer and Singleton (both of which come from GoF). Then we'll move on to two quasi-patterns, Model-View-Controller (MVC) and the delegation event model . MVC is a combination of patterns that grew out of the Smalltalk language and is used to structure user interfaces. The delegation event model is a core Java pattern that describes how to implement events and event handling.

Among the large number of formal and informal design patterns available today, the four patterns presented in this section were chosen because:

  • They're extremely well-known and relatively easy to understand.

  • They address event architectures, an important part of OOP that affects nearly every application.

  • They demonstrate tangible , practical ways to develop user interfaces in OOP, which is perhaps the most important aspect of Flash application development.

The Observer pattern is up first, so put on your thinking caps and let's get started.

 <  Day Day Up  >  


Essential ActionScript 2.0
Essential ActionScript 2.0
ISBN: 0596006527
EAN: 2147483647
Year: 2004
Pages: 177
Authors: Colin Moock

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net