Learn some patterns – Advanced ActionScript 3.0 with Design Patterns
I’ve been reading this book by Joey Lott and Danny Patterson since yesterday and thought I’d loose a couple of words about it …
The book starts with a chapter about application design where it explains how to go through the analysis-, design- , implementation and testing phase. It introduces how to utilize Use Case- and Class Diagrams and then gives a lesson on how to use FlexUnit for unit testing. In the second chapter is a good explanation about why and how to use Interfaces (instead of Inheritance) and after that it goes into detail with teaching nine of the more common Design Patterns, namely MVC, Singleton, Factory/Template Method, Proxy, Iterator, Composite, Decorator, Command, Memento and State. In part 3 of the book you’ll find in-depth information about AS 3.0 features like Events, data IO, E4X and Regular Expressions.
[ad#ad_content]So how good is this book? If you are familiar with ActionScript 2 or 3 this is a good book which is easy to understand and to follow most time. If you’re rather new to AS it might be more difficult, not only because of the difficulty to understand OOP but also because many of the code listings in the book have errors. Somebody who is experienced with ActionScript will usually notice the mistakes and correct them while typing but somebody without enough knowledge will probably curse about why the examples per se don’t run.
Many of the Pattern lessons go into deeper detail than other Pattern books I’ve read which is a plus! For example in the Command Pattern they not just tell that this Pattern can be used to code Undo/Redo functionality, it also shows how to do so. On the other hand some of the code listing are a bit boring. Who wants to type that dull clock application again for learning the MVC pattern?! I think I saw it before in EAS2.0. But it might be just me waiting for the day where such books are tailored for Game Programmers!
Personally I would have welcome it if the design process stuff had received more attention by being more deep and for example explaining sequence diagrams.
During the code examples some classes are utilized that are part of the book and can be downloaded on the web, or let’s say they could be downloaded if the book’s code site were available already.
Apart from these small slips (from which the code incorrectness weights most IMO) I would say this is a decent book that has the ability to teach Patterns where other books were either too advanced or too simple for this topic.