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.

Table of Contents<br />

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi<br />

Part I. Constant Change<br />

1. Object-Oriented Programming, <strong>Design</strong> <strong>Patterns</strong>, and <strong>ActionScript</strong> <strong>3.0</strong> . . . . . 3<br />

The Pleasure of Doing Something Well 3<br />

OOP Basics 10<br />

Abstraction 11<br />

Encapsulation 15<br />

Inheritance 24<br />

Polymorphism 34<br />

Principles of <strong>Design</strong> Pattern Development 42<br />

Program to Interfaces over Implementations 45<br />

Favor Composition 49<br />

Maintenance and Extensibility Planning 57<br />

Your Application Plan: It Ain’t You Babe 60<br />

Part II. Creational <strong>Patterns</strong><br />

2. Factory Method Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65<br />

What Is the Factory Method Pattern? 65<br />

Abstract Classes in <strong>ActionScript</strong> <strong>3.0</strong> 68<br />

Minimalist Example 69<br />

Hiding the Product Classes 73<br />

Example: Print Shop 74<br />

Extended Example: Color Printing 80<br />

Key OOP Concepts Used in the Factory Method Pattern 84<br />

vii

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

Saved successfully!

Ooh no, something went wrong!