Book Review: Adobe Flex 4 Training from the Source

by David Salahi on July 21, 2010

Adobe Flex 4 Training from the Source, Volume 1, an Adobe Press release, is an outstanding resource for getting up to speed on the Adobe Flex 4 SDK and the Flash Builder 4 IDE. Most technical books take a sort of catalog approach to presenting their material. That is, each chapter discusses a specific set of topics, mostly in isolation from other chapters. By contrast, this book uses the same approach as Adobe’s excellent Classroom in a Book series to provide a well-designed curriculum for learning. In this book the reader/student works through a series of tutorials beginning with a simple "Hello, World" type of application. Each successive exercise builds on the previous one and the book eventually culminates in a moderately complex sample ecommerce site. An important point is that the book truly encompasses a curriculum for learning all of the most important aspects of the Flex framework and the individual chapters work together to form an integrated whole.

Table of Contents

Lesson 1: Understanding Rich Internet Applications

Lesson 2: Getting Started with Flex Application Development

Lesson 3: Laying Out the User Interface

Lesson 4: Using Simple Flex Controls

Lesson 5: Handling Events

Lesson 6: Using Remote XML Data

Lesson 7: Creating Classes

Lesson 8: Using Data Binding and Collections

Lesson 9: Breaking the Application into Components

Lesson 10: Using DataGroups and Lists

Lesson 11: Creating and Dispatching Events

Lesson 12: Using DataGrids and ItemRenderers

Lesson 13: Using Drag and Drop

Lesson 14: Implementing Navigation

Lesson 15: Using Formatters and Validators

Lesson 16: Customizing a Flex Application with Styles

Lesson 17: Customizing a Flex Application with Skins

Lesson 18: Creating Custom ActionScript Components

Available in both ebook and soft cover formats

The book begins with an overview of various rich internet application (RIA) technologies including Flash/Flex, JavaScript/AJAX, and Silverlight. And, though this is a book from Adobe Press, the synopsis of these technologies is accurate and even-handed. After a definition of RIA and an introduction to its advantages the book proceeds with its series of tutorials which demonstrates many of the essential features of both the Flex SDK and the Flash Builder (formerly Flex Builder) integrated development environment.

Each tutorial consists of a series of instructions that you follow by typing in the code. The initial exercises are, of necessity, brief and not reflective of real applications. For example, in the beginning exercises product information for the online store is hard-coded into the app. But as you go along, that soon changes, with each successive chapter more closely approaching a realistic application development scenario. And, although the book has you typing the essential code so that you learn it well, it also provides you with assets such as XML files containing product listings so that you avoid typing repetitive material which is not instructive. Later, when it is time to switch from loading XML from your local PC to loading it from a web server, they supply a URL on the book’s website so that you don’t have to worry about setting up a local web server or uploading the file to a server on the internet.

Although each completed exercise is used as the starting point for the next exercise you never need to worry about getting out of sync due to an error in your code. A disc which accompanies the book provides code samples for the beginning and end of every chapter. So, if you have a typo in your code you’re not forced to hunt down the error (although that can be good practice). You can just pick up at the next chapter with the correct code from the disc. Also, a number of chapters have independent out-of-sequence tutorials to illustrate points that wouldn’t easily be demonstrated within the core application that you’re building.

As I mentioned, the book starts out with very simple applications which become progressively more sophisticated. Along the way, the exercises instruct you in refactoring the application as it becomes increasingly realistic. Various software development best practices, such as loose coupling and creating reusable components, are discussed and illustrated with concrete examples throughout the book.

One thing that I particularly liked is that the examples show you how to really leverage the features of the Flex framework. One example is the use of a filter function with the ArrayCollection object. By writing a filter function that returns a Boolean you can easily filter out some of the objects in an ArrayCollection which is bound to a control such as a DataGrid. In the book’s example you write a filter function to display only the products in the product category currently selected by the user. Of course, this is much easier and more efficient than writing code to build a duplicate Array with the desired subset of  products. Throughout the book, the authors demonstrate techniques like this to empower you to get the most out of the Flex framework. Personally, I had been aware of the various Flex collection objects, including Array, ArrayList, and ArrayCollection, but had been unclear about the differences between them. On p. 242 the authors give a clear explanation on the features that each provides so that you can choose the lightest-weight object that provides the functionality you need.

The book is very accurate, with few errors and those are of only the most minor sort. Throughout the book the instructions are clear and easy to follow. In some sections when things begin to get complicated the authors give you a nice overview of what’s coming up, step by step. Also, completed code listings are presented regularly so that you can compare your work in progress with where you’re supposed to be.

When I initially read an overview of the book’s contents I thought it might be too basic for me. But I’m glad I gave the book a chance because it turned out to be a rich source of information that gave me a deeper understanding of the Flex framework. In addition, the book introduced me to some features of the Flex SDK and the Flash Builder IDE which I previously hadn’t used much. One example is the Design View. I usually do things in Source View but there are times when it’s more convenient to use Design View so it’s good to know your way around it. Similarly, even though I may not use certain features of the SDK other developers do use them so it’s good to have an awareness of those features in order to be better able to read code from team members or code downloaded from the internet.

All in all, the book comes about as close as is possible to being the ideal Flex training experience—short of a classroom experience. And, I can also easily see the book being used in a classroom setting. Either way, the curriculum is well designed and the book is well written so it’s also easy to follow along. You do need to have a basic software development background including a solid understanding of basic object-oriented programming principles. But given that, a developer could begin with little or no knowledge of Flex and proceed through the book to gain a good understanding of MXML and ActionScript. I’m looking forward to seeing Volume 2 when it comes out.

Leave a Comment

 

{ 1 trackback }

Previous post:

Next post: