ActionScript 3.0 design patterns
Now that ActionScript is reengineered from top to bottom as a true object-oriented programming (OOP) language, reusable design patterns are an ideal way to solve common problems in Flash and Flex applications. If you're an experienced Flash or Flex developer ready to tackle sophisticated progr...
Autor principal: | |
---|---|
Otros Autores: | |
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
Sebastopol, California :
O'Reilly
2007.
|
Edición: | First edition |
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009627012506719 |
Tabla de Contenidos:
- ActionScript 3.0 Design Patterns; How this Book is Organized; What You Need to Use This Book; User&s Guide; Flash Media Server 2 developers; Companion Tools You&ll Want; Conventions Used in This Book; Using Code Examples; We&d Like to Hear from You; Acknowledgments; Technical Reviewers; Editors; Authors; Chandima Cumaranatunge; Dedication:; 1. Object-Oriented Programming, Design Patterns, and ActionScript 3.0; Transition to OOP; Timeline scripts; Document class; Movie clip and button classes; OOP Basics; Abstraction; Why Abstractions Are Important; Encapsulation
- The many meanings of interfaceGetters and setters; The get and set methods; Using Encapsulation and Design Patterns; Inheritance; Writing Classes for Inheritance; Using Interfaces and Abstract Classes in ActionScript 3.0; Abstract classes and overriding inheritance; Why use interfaces and abstract classes?; Polymorphism; Implementing Polymorphism with Interfaces; Principles of Design Pattern Development; State; Client and Request; Program to Interfaces over Implementations; Using Complex Interfaces; Favor Composition; Using Delegation
- Making Composition, Inheritance, and Instantiation Work TogetherMaintenance and Extensibility Planning; Adding Extensibility to a Plan with Granularity; Your Application Plan: It Ain&t You Babe; Choosing the Right Design Pattern; Achieving Better OOP Through Design Patterns; 2. Factory Method Pattern; Abstract Classes in ActionScript 3.0; Minimalist Example; Creator Classes; Clients; Hiding the Product Classes; Example: Print Shop; Creator Classes: Print Centers; Clients; Print Shop Extension; Parameterized Factory Methods; Extended Example: Color Printing
- New Creator Classes: Integrating a Parameterized Factory MethodClients; Parallel Class Hierarchies; Key OOP Concepts Used in the Factory Method Pattern; Example: Sprite Factory; Creator Classes: Shape Creators; Clients; Example: Vertical Shooter Game; Space ships; Creator Classes; ShipCreator; Concrete Creator Classes; Clients; Summary; 3. Singleton Pattern; The Singleton Model; Key OOP Concepts Used with the Singleton Pattern; Creating a Private Class Instance; Minimalist Abstract Singleton; A Singleton Instantiation Method; One Instance and Different References
- When to Use the Singleton PatternJust One Tune at a Time; Using Multiple References in a Shopping Cart; Summary; 4. Decorator Pattern; The Decorator Model; Key OOP Concepts Used with the Decorator Pattern; Wrapping Responsibilities; Flexibility and Adaptability; Minimalist Abstract Decorator; Abstract Decorator Class; Concrete Decorations; Wrapping Up; Applying a Simple Decorator Pattern in Flash: Paper Doll; Decorator Class Dressing the Dolls; The Concrete Classes; Concrete decorator classes; Implementing the Paper Doll Decorator; Decorating with Deadly Sins and Heavenly Virtues
- Multiple Concrete Components