ActionScript 3.0 Design Patterns: Object-Oriented Programming Techniques

Overview

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 programming techniques with ActionScript 3.0, this hands-on introduction to design patterns is the book you need.

ActionScript 3.0 Design Patterns takes you step by step through the process, ...

See more details below
Other sellers (Paperback)
  • All (36) from $1.99   
  • New (8) from $8.51   
  • Used (28) from $1.99   
ActionScript 3.0 Design Patterns: Object Oriented Programming Techniques

Available on NOOK devices and apps  
  • NOOK Devices
  • Samsung Galaxy Tab 4 NOOK
  • NOOK HD/HD+ Tablet
  • NOOK
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK for Web

Want a NOOK? Explore Now

NOOK Book (eBook)
$19.99
BN.com price
(Save 44%)$35.99 List Price

Overview

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 programming techniques with ActionScript 3.0, this hands-on introduction to design patterns is the book you need.

ActionScript 3.0 Design Patterns takes you step by step through the process, first by explaining how design patterns provide a clear road map for structuring code that actually makes OOP languages easier to learn and use. You then learn about various types of design patterns and construct small abstract examples before trying your hand at building full-fledged working applications outlined in the book. Topics in ActionScript 3.0 Design Patterns include:

  • Key features of ActionScript 3.0 and why it became an OOP language
  • OOP characteristics, such as classes, abstraction, inheritance, and polymorphism
  • The benefits of using design patterns
  • Creational patterns, including Factory and Singleton patterns
  • Structural patterns, including Decorator, Adapter, and Composite patterns
  • Behavioral patterns, including Command, Observer, Strategy, and State patterns
  • Multiple design patterns, including Model-View-Controller and Symmetric Proxy designs
During the course of the book, you'll work with examples of increasing complexity, such as an e-business application with service options that users can select, an interface for selecting a class of products and individual products in each class, an action game application, a video record and playback application, and many more. Whether you're coming to Flash and Flex from Java or C++, or have experience with ActionScript 2.0, ActionScript 3.0 Design Patterns will have you constructing truly elegant solutions for your Flash and Flex applications in no time.
Read More Show Less

Product Details

  • ISBN-13: 9780596528461
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 7/1/2007
  • Series: Adobe Developer Library Series
  • Edition number: 1
  • Pages: 544
  • Product dimensions: 7.12 (w) x 9.12 (h) x 0.97 (d)

Meet the Author

Dr. William Sanders is a Professor of Interactive Information Technology at the University of Hartford. He teaches courses in Flash, ActionScript, Flash Media Server, PHP, C#, SQL, and XHTML among other Internet languages. He has published 44 computer and computer-related books, written software ranging from Basic to Flash Media Server ActionScript and served as a consultant for different computer software companies.

Dr. Chadima Cumaranatunge is an Assistant Professor of Interactive Information Technology at the University of Hartford. He teaches an introduction to the IIT major, covering Flash and some ActionScript, a gaming course using Flash and ActionScript as well as educational technology courses in the Education, Nursing, and Health Professions College. Recently he received a grant to teach an experimental course in robotics.

Read More Show Less

Table of Contents

Preface;
Who this Book is for;
How this Book is Organized;
What You Need to Use This Book;
Say It Again, Sam;
User's Guide;
Flex 2 developers;
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;
Bill Sanders;
Chandima Cumaranatunge;
Dedication:;
Chapter 1: Object-Oriented Programming, Design Patterns, and ActionScript 3.0;
The Pleasure of Doing Something Well;
Sequential and Procedural Programming;
Transition to OOP;
MovieClip and Button scripts;
Timeline scripts;
Document class;
Movie clip and button classes;
OOP Basics;
Abstraction;
Abstractions in ActionScript 3.0;
Why Abstractions Are Important;
Encapsulation;
Hiding Your Data from Bad Consequences;
Private variables;
The many meanings of interface;
Getters and setters;
The get and set methods;
Using Encapsulation and Design Patterns;
Inheritance;
Looking at the Ancestors;
Writing Classes for Inheritance;
Using Interfaces and Abstract Classes in ActionScript 3.0;
Interface constructs;
Abstract classes and overriding inheritance;
Why use interfaces and abstract classes?;
Polymorphism;
Generating Polymorphism Using An Abstract Class;
Implementing Polymorphism with Interfaces;
Principles of Design Pattern Development;
Implementation;
State;
Client and Request;
Program to Interfaces over Implementations;
Managing Dependency;
Using Complex Interfaces;
Favor Composition;
Doing Composition;
Using Delegation;
Making Composition, Inheritance, and Instantiation Work Together;
Maintenance and Extensibility Planning;
Planning Only for Maintenance;
Adding Extensibility to a Plan with Granularity;
Your Application Plan: It Ain't You Babe;
Using OOP and Design Patterns to Meet Client Goals;
Choosing the Right Design Pattern;
Achieving Better OOP Through Design Patterns;
Chapter 2: Factory Method Pattern;
What is the Factory Method Pattern?;
Model of the Factory Method Pattern;
Abstract Classes in ActionScript 3.0;
Minimalist Example;
Product Classes;
Creator Classes;
Clients;
Hiding the Product Classes;
Example: Print Shop;
Product Classes: Print Jobs;
Creator Classes: Print Centers;
Clients;
Print Shop Extension;
Parameterized Factory Methods;
Extended Example: Color Printing;
New Product Classes;
New Creator Classes: Integrating a Parameterized Factory Method;
Clients;
Parallel Class Hierarchies;
Key OOP Concepts Used in the Factory Method Pattern;
Example: Sprite Factory;
Product Classes: Shape Widgets;
Creator Classes: Shape Creators;
Clients;
Example: Vertical Shooter Game;
Product Classes;
Projectiles;
Space ships;
Creator Classes;
Weapon;
ShipCreator;
Concrete Creator Classes;
Clients;
Summary;
Chapter 3: Singleton Pattern;
What is the Singleton Pattern?;
Key Features;
The Singleton Model;
Key OOP Concepts Used with the Singleton Pattern;
Creating and Using a Private Class Constructor;
Creating a Private Class Instance;
Minimalist Abstract Singleton;
Instantiation with a Private Class Parameter;
A Singleton Instantiation Method;
One Instance and Different References;
When to Use the Singleton Pattern;
A Single Alert Message;
Just One Tune at a Time;
Using Multiple References in a Shopping Cart;
Summary;
Chapter 4: Decorator Pattern;
What is the Decorator Pattern?;
Key Features;
The Decorator Model;
Key OOP Concepts Used with the Decorator Pattern;
Unwanted Inheritance;
Wrapping Responsibilities;
Flexibility and Adaptability;
Minimalist Abstract Decorator;
Abstract Component Class;
Abstract Decorator Class;
Concrete Decorations;
Wrapping Up;
Applying a Simple Decorator Pattern in Flash: Paper Doll;
Setting Up the Component Class;
Decorator Class Dressing the Dolls;
The Concrete Classes;
Concrete component class;
Concrete decorator classes;
Implementing the Paper Doll Decorator;
Decorating with Deadly Sins and Heavenly Virtues;
Adding Properties and Methods;
Multiple Concrete Components;
Decorating with Multiple Properties;
Multiple Method Concrete Decorations;
The Good and Evil Concrete Decorators;
Heavenly Virtues;
Deadly Sins;
Implementing the Good and Evil Decorator;
Dual implementation;
Charting souls;
Dynamic Selection of Concrete Components and Decorations: a Hybrid Car Dealership;
Setting Up the Hybrid Car Components;
Auto abstract component;
Hybrid car classes concrete component;
Using Auto Options as Decorators;
The options abstract decorator;
The options concrete decorators;
Setting Up the User Interface;
Creating the document and setting the stage;
Implementing the concrete components and their decorators;
Summary;
Chapter 5: Adapter Pattern;
What is the Adapter Pattern?;
A Design Pattern for Potty Training;
Key Features of the Adapter Pattern;
Object and Class Adapters;
Object Adapters;
Minimalist example of an object adapter;
Using a parameterized adapter class;
Class Adapters;
Minimalist example of a class adapter;
Key OOP Concepts in the Adapter Pattern;
Object and Class Adapters Compared;
Example: Car Steering Adapter;
The Existing Class;
Interface Conversion;
The original interface;
The new context;
The new interface;
The Adapter Class;
The Client;
Extended Example: Steering the Car Using a Mouse;
Example: List Display Adapter;
The Existing Class;
Interface Conversion;
The Adapter Class;
The Client;
Extended Example: Displaying the O'Reilly New Books List;
Summary;
Chapter 6: Composite Pattern;
What is the Composite Pattern?;
Key Features of the Composite Pattern;
Minimalist Example of a Composite Pattern;
Accessing Child Nodes;
Removing Nodes;
Creating a parent reference;
Implementing the remove method;
Building and Manipulating a Composite Structure;
Key OOP Concepts in the Composite Pattern;
Example: Music Playlists;
Queuing Songs to Play in Sequence;
Building Composite Playlists;
Example: Animating Composite Objects Using Inverse Kinematics;
Using Inverse Kinematics;
Creating Component and Composite Nodes for the Snake;
Building the Snake Head;
Controlling the Snake;
Moving a Kinematic Pair;
Building the Body and Tail Segments;
Building the Composite Snake;
Using Flash's Built-in Composite Structure: the Display List;
Creating a Composite Airplane;
Developing the Component and Composite Classes for the Airplane;
Creating the Fuselage, Wings, and Engines;
Building the Composite Structure;
Calculating the Total Weight of the Airplane;
Modifying Components to Reflect Damage;
Calculating Total Damage to the Airplane;
Summary;
Chapter 7: Command Pattern;
What is the Command Pattern?;
Mom Needs to Issue Some Commands;
Key Features of the Command Pattern;
Class Diagram of the Command Pattern;
Minimalist Example of a Command Pattern;
The Command Interface;
The Concrete Command;
The Receiver;
The Invoker;
The Client;
Setting a Trigger to Invoke the Command;
Key OOP Concepts in the Command Pattern;
Minimalist Example: Macro Commands;
The Macro Command Interface;
Two Concrete Subcommands;
The Concrete Macro Command;
A Macro Command Object Created from the Client;
Example: Number Manipulator;
A Utility Button Class;
Triggering an Invoker by Button Clicks;
The Increment and Decrement Commands;
The Client;
Extended Example: Sharing Command Objects;
Triggering an Invoker by Key Presses;
Sharing Command Objects from the Client;
Extended Example: Implementing Undo;
An Abstract Interface for Commands;
Concrete Commands that Implement Undo;
Undoable Commands Assigned from the Client;
Example: Podcast Radio;
What is a Podcast?;
Creating a Package with Utility Classes;
Creating a Command to Play a Podcast;
Developing the Radio Receiver;
Push Button Invokers for the Radio;
The Client Assigns Podcasts to Push Buttons;
Extended Example: Dynamic Command Object Assignment;
A Context Sensitive Invoker;
Commands to Dynamically Assign Command Objects;
Dynamic Command Assignment Setup from the Client;
Summary;
Chapter 8: Observer Pattern;
What is the Observer Pattern?;
Key Features;
The Observer Model;
Key OOP Concepts Used with the Observer Pattern;
Choose the Interface;
Object Composition;
Minimalist Abstract Observer;
Subject Interface;
Observer Interface;
Concrete Subject;
Concrete Observer;
Working the Observer;
Example: Adding States and Identifying Users;
Multiple States;
Who are You?;
Updated Observer;
Playing the Bugle;
Dynamically Changing States;
Recording a Space Battle;
Giving More Work to the Concrete Classes;
Launching the Space Battle;
Setting up the Flash document;
Building the spaceships;
Building the weapons;
Building the Android space station and beam;
Writing a Change Handler;
Example: Working with Different Data Displays;
The Output Designer;
The Concrete Classes and a Double Implementation;
The Data Design Classes;
UIList component;
Bar chart display;
The line graph;
Pulling All the Elements Together;
Summary;
Chapter 9: Template Method Pattern;
What is the Template Method Pattern?;
Key Features;
The Template Method Model;
Key OOP Concepts used with the Template Method;
Why Inheritance and Not Composition?;
Abstract Functions and Override Flexibility;
Consider Variation;
The Hollywood Principle;
Minimalist Example: Abstract Template Method;
Bare Bones Template Method;
Testing Templates;
Employing Flexibility in the Template Method;
Selecting and Playing Sound and Video;
Setting Up the Format;
Not-So-Concrete Concrete Classes;
The Detail Classes;
Playing the Media;
Hooking It Up;
When to Hook?;
The Hook as a Lonely Repairman;
Baja Flight with a Hook;
Summary;
Chapter 10: State Design Pattern;
Design Pattern to Create a State Machine;
Key Features;
The State Model;
Transitions;
Triggers;
State design structure;
Key OOP Concepts Used with the State Pattern;
Minimalist Abstract State Pattern;
Managing All Those States: Hardworking Context Class;
Creating a context class;
Completing and testing the abstract state machine;
Video Player Concrete State Application;
Expanding the State Design: Adding States;
Adding the Pause State to the Statechart;
Adding New Behaviors;
Adding More States and Streaming Capabilities;
Setting Up Your ActionScript 3.0 Script for FMS2;
The Adaptable States;
Summary;
Chapter 11: Strategy Pattern;
What is the Strategy Pattern?;
Key Features;
The Strategy Model;
Key OOP Concepts Used with the Strategy Pattern;
Encapsulating Variation;
Unencapsulated version (pseudocode);
Encapsulated algorithms (pseudocode);
Using Delegation and Delegates;
Minimalist Abstract State Pattern;
Using Delegation with the Context;
Adding a Strategy;
Details of the Strategy;
More Delegation in a Concrete Context;
Pulling All the Parts Together;
Adding More Concrete Strategies and Concrete Contexts;
The Clowns;
The Trick Interface and Implementations;
The Skits Interface and Implementations;
Here Come the Clowns!;
Additional Clown Functionality;
Adding a new clown;
Adding a new trick;
Revising clown college;
Tricks and Skits Reorganization: Clown Planning;
Working with String Strategies;
Contexts for String Strategies;
String Strategies;
Checking strategies;
Sort strategies;
Support Classes;
String Strategy Test;
Summary;
Chapter 12: Model-View-Controller Pattern;
What is the Model-View-Controller (MVC) Pattern?;
Model;
View;
Controller;
Communication Between the MVC elements;
Embedded Patterns in the MVC;
Minimalist Example of an MVC Pattern;
Model as a Concrete Subject in an Observer Pattern;
The EventDispatcher class in ActionScript 3.0;
The model;
Controller as a Concrete Strategy in a Strategy Pattern;
The controller;
View as a Concrete Observer in an Observer Pattern and context in a Strategy Pattern;
Building the MVC Triad;
Nested Views as Leaves and Nodes of a Composite Pattern;
Component and composite views;
Creating nested views;
Building the Nested View Structure;
Key Features of the MVC Pattern;
Key OOP Concepts in the MVC Pattern;
Example: Weather Maps;
The Model;
The Controller;
The Views;
Combo box view;
Map view;
Building the MVC Triad;
Setting the Model to Self-Update;
Extended Example: Infrared Weather Maps;
Adding a New Model;
Adding a New Controller;
Adding a New View;
Building the MVC Triad;
Example: Cars;
The Model;
The Controller;
The Views;
Building the Car;
Custom Views;
Direction Gauge View;
GPS View;
Adding the Custom Views;
Adding a Chase Car;
Summary;
Chapter 13: Symmetric Proxy Pattern;
Simultaneous Game Moves and Outcomes;
The Player;
The Referee;
The Internet, Proxies, and Players;
The Symmetric Proxy Pattern;
Key Features;
The cell;
The proxy;
Key OOP Concepts Used with the Symmetric Proxy;
Communication Flexibility;
Game Flexibility;
The Player Interface;
The Referee;
Methods;
Template Method;
RPS Subclass;
Information Shared over the Internet;
Player-Proxy Classes;
Move Making;
Event to move;
Dual moves;
Proxy move;
Referee object;
Player 2 Changes;
Classes and Document Files Support;
Dynamic Output Text Fields;
Button Controls;
The Flash File and Connection Movie Clip;
Summary;

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing 1 Customer Reviews
  • Anonymous

    Posted August 18, 2009

    No text was provided for this review.

Sort by: Showing 1 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)