Advanced ActionScript 3 with Design Patterns

by Adobe Press

$44.99
buy from amazon.com
Average Rating: * * * * half star
Sales Rank:24867 (lower is better)
Price Used:$24.00
Shipping:Free Shipping on most orders over $25*
Availability:Usually ships in 24 hours
Label:Adobe Press
Pages:304
Binding:Paperback
Publication Date:2006-11-12
Published By:Adobe Press
ASIN:0321426568
Category:Book

Authors

Editorial Reviews and Product Descriptions

Product Description

Today's ActionScript-based applications require increasingly sophisticated architectures and code. This book aids intermediate and advanced ActionScript developers in  learning how to plan and build applications more effectively. You'll learn how to apply design patterns as solutions to common programming scenarios. Beyond a reference, Advanced ActionScript with Design Patterns is a practical guide complete with sample mini-applications illustrating each design pattern.

Table of Contents:

Part I - Successful Projects
1. How to Design Applications
   
2. Programming to Interfaces
   
Part II - Patterns

3. MVC
   
4. Singleton
   
5. Factory (Abstract Factory and Factory Method)
   
6. Proxy
   
7. Iterator
   
8. Composite
   
9. Decorator
   
10. Command
   
11. Memento
   
12. State
   
Part III - Advanced ActionScript Topics

13. Working with Events
   
14. Sending and Loading Data
   
15. E4X (XML)
   
16. Regular Expressions


Customer Reviews

Good Introduction to Design Patterns - Reviewed on 2008-02-19
* * * * *

If you are interested in improving your code to be more maintainable, flexible and gaining a better understanding of Object Oriented Programming (OOP) this is a good book to have. The core concepts are explained in readable language and the code examples are for the most part well-written.

I did notice one criticism of another reviewer is that the book did not address Flex UI components or MXML. Flex is certainly beyond the scope of this book and there are many excellent books on Flex 2+ that will better explain the concepts of programming in Flex. This book is about ActionScript 3 and so it mainly addresses the classes available in the flash package. That does not mean that you cannot apply the concepts from this book to a Flex application however Cairngorm and PureMVC are the patterns most Flex developers gravitate towards and so they would be a better starting point for someone interested in that development platform. For those patterns a developer would likely find the internet to be the best resource for tutorials and information however both of those design patterns are based on core concepts explained in detail in this book so it can give you greater understanding and make the learning process easier.

Even if Flex is your primary area of interest this book can help with understanding many of the underlying core concepts of programming in ActionScript 3 and given the right understanding you can create a Flex application with little or no MXML.

The section on events is worth purchasing the book. It is well-written and is one of the better if not best explanations on the subject as has been pointed out in other reviews.
Pretty Good for a Re-hash - Reviewed on 2008-01-06
* * * *

This book served really well as a review to some of the GOF patterns. I already understood the patterns covered, looking at the Actionscript implementations was still somewhat helpful.

I bought the book for its coverage of Actionscript events, which is really the key to creating great apps with Actionscript and Flex (WARNING: all of the examples assume you're building Flash applications, which are similar but not identical to Flex apps). And for its coverage of E4X, Actionscript 3's new XML format. Those two chapters are gems, and I wish I could have bought them in pamphlet form.
Great Book! - Reviewed on 2007-12-04
* * * * *

Although written specifically for ActionScript this book really helped me further my understanding of design patterns and how to apply them to all my software development projects. Additionally, the the last few chapters cover some advanced ActionScript topics like E4X. Recommended for any experienced developer interested in design patterns.
Need this in your library. - Reviewed on 2007-09-25
* * * *
2 customers found this review helpful, 1 did not.

At first when I thought about buying this book I was not sure to what to expect but I did see Joey Lott's name on it and thought it had to be worth it. Well it seems that this is exactly what I have been looking for. As a developer I come across many common problems that haunt me through every application I create, from passing data throughout the application to proper encapsulation.

This is a must have for your library. I have been working with Actionscript 3.0 for close to a year now and I will now have this book close to my side at all times.

Joey Lott(who never disappoints me) and Danny Patterson give a clear comprehensive explanation of design patterns for developers. Not only do they explain them but also clean examples on how and why you would use them.

The only reason I do not give 5 stars is there is a lot of syntax errors especially in the code snippets. Since I am a little more advanced in Actionscript I was able to catch them with little effort but a novice programmer may not.
Perfect balance of concepts and AS3 specific idioms - Reviewed on 2007-08-27
* * * * *
1 customer found this review helpful, 1 did not.

This book is clearly written by authors who "think in ActionScript 3" and it's written at the perfect level for folks who already understand design patterns but want some guidance on how they apply (or don't) in AS3.

If you are looking for an introduction to Design Patterns, this book does a decent job of that but it generally assumes you have a bit of understanding in that regard. The HeadFirst book (java) walks you through application evolution which really makes the case for why the patterns are useful. The HeadFirst book also includes exercises that really make the concepts sink in and teach you to recognize when each pattern applies. However, the head first book is very much a java book. Similarly, the original design patterns book by the Gang of Four (GoF) is about design patterns in C++.

This book, however is written clearly from the perspective of an ActionScript 3 (AS3) programmer. In some core ways, AS3 is very different than Java and even more so with respect to C++. The event model is baked into the language and asynchronous programming is a different style. Also, XML and XPath are native constructs in ActionScript 3, not libraries like they are in other languages. These differences (among others) imply that some of the original GoF and Java patterns manifest themselves differently and some patterns don't apply at all. This book doesn't merely take the Java or C++ idioms and make them run under ActionScript 3. They've totally re-thought them and presented the ones that are appropriate for AS3 in a way that is probably ideal for AS3. They've also left out or provided alternatives for the traditional ones that are not appropriate considering the language differences. For instance, the observer pattern is one of the core GoF and HeadFirst patterns. However, it doesn't show up in this book. Instead, there is a chapter on "WORKING WITH EVENTS" which is the native AS3 construct that essentially takes the place of the observer pattern. In contrast, the O'reilly book happily shows you an AS3 translation of the GoF/HeadFirst observer pattern and never tells you to use the built-in event structure instead.

Not only do the authors demonstrate their "thinking in AS3" at the level of design patterns but their code examples include lots of little AS3 specific idioms. AS3 still shows it's dynamic language roots in subtle ways and these authors play to that strength. For instance, a dynamic class inherited from the Proxy class includes a method called, getProperty(). In chapter 4, they override this method and use it in combination with E4X (the native XML capability), to provides an elegant way to build a generic application settings framework that you can use in any application without modification. If your XML settings file changes, the class will appear to magically change its interface. The chapter is about the Singleton pattern but I learned about dynamic/Proxy/getProperty() and E4X idioms as a side benefit.

If I had one complaint about this book, it's a minor one and it's a complaint that I also make about the Java language and I'm now starting to regularly make about Adobe's recommendations with respect to AS3 class interfaces. Like C# and Python and other more recent languages, AS3 has a construct for turning public property references into get/set function calls without changing the calling code. This book shows you that style of coding as well as the Java recommended getSomeProperty/setSomeProperty style but it recommends that you never use public properties in your class interfaces. In my mind, the main advantage to having the get/set function language feature is that you can start out with public properties and later change them to accessors methods without breaking the calling code. The reason we don't recommend that you have public properties in java is that there is no language feature that allows you to later add accessor methods without breaking the calling code. In Java, the lessor of two evils is to have you always create them up front. I see no reason to live with the same evil in AS3. However, this is minor nit and now that you've read my explanation here, you can ignore the recommendation. :)

I highly recommend this book. If you have the least bit of experience with design patterns and are now coding in AS3, just get this book. If you are totally new to the concept of design patterns, then you may want to get the HeadFirst book AND this book.
Read More Customer Reviews »
Go To Amazon Product Page

* - See Amazon Product Page for shipping and pricing details.


Book Subjects