Archive for the 'Reviews' Category

Book Review: Foundation Flex for Developers

Tuesday, April 29th, 2008

Foundation Flex for Developers: Data-Driven Applications with PHP, ASP.NET, ColdFusion, and LCDS

Great Coverage of Flex with Decent Case Studies

This book was an in depth coverage of the Flex technology, from creating custom components to how to build data driven applications. There is a great chapter on integrating with the web browser using javascript or an Ajax-Flex bridge.

It goes very in depth in covering XML in Flex builder with detailed information on understanding E4X expressions. Which I will refer back to many times in my development process for these great techniques. And great best practice information for MXML.

I would have liked more coverage of how to integrate Flex with the Flash IDE type workflow. Other than creating components. There’s a good but brief overview of AS3.

The case studies for connecting to data-driven applications are pretty short but useful. The PHP chapter walks though a Flex blog management system with a tabbed interface. It walks through how to set this up in with PHP code and how to connect to a MySQL database. With all the sample files available for download on the Friends of Ed website.

The book is very long (over 500 pages) and most useful for me as a desk reference when needing assistance while working with particular items in Flex. It tries to cover so much in terms of data driven technologies that the individual case studies feel a bit shallow.

Overall, I recommend this book to anyone that wants to learn or improve their knowledge of Flex and best practices using AS3 in Flex.

-Paul Mayne
paulmayne.org

FlexBuilder 2

Thursday, April 26th, 2007

Flex is an amazing tool for developing Rich Internet Applications (RIAs). It’s one of those things that when you first hear about it, it sounds cool, and when you first see it, it looks great as well. Then, once you start to use it and play with it a little, you start to wonder how you got along without it. One of the biggest hurdles to overcome when using Flex however, is learning it.

The basics of Flex development aren’t that hard to pick up. You can have a pretty decent application up and running within a hour or so of starting to use Flex. But to really unleash the abilities and power that Flex offers, you need to know what you’re doing. You also need to make sure that you have the right tools to get the job done. I’ve been recently really trying to dig into Flex, and start migrating a lot of my projects into using it. However, I was having a hard time, because I didn’t have the right tools for the job.

There are two ways that you can develop Flex applications. Adobe has made the Flex SDK freely available to download. The SDK includes a bare bones kit of the basics you’ll need to develop Flex applications. You’ll receive some basic instructions, the Flex framework components needed to compile Flex apps, and of course, the Flex compilers: mxmlc for applications, and compc for components. It also includes a command-line based debugger, fdb. Pair the SDK with a text editor, and you’re in business. However, it’s not the quickest, nor the fastest way to develop a Flex app. It’s honestly like writing an entire website using only Notepad instead of something like Dreamweaver. It’ll get the job done, but it’s not the most efficient way to do it. And you’ll really need to know what you’re doing - for someone trying to learn Flex, it only adds to the challenge.

This is how I’ve been learning/working in Flex. Using SubEthaEdit on my Mac, with mxmlc to compile. It wasn’t pretty, but it worked. However, now having used Flex Builder, I wince when I think about someone doing serious Flex development using that setup.

Flex Builder 2 is really the perfect environment for developing Flex or ActionScript 3.0 applications. Built on top of Eclipse - the integrated development environment of choice for many developers, it’s the best tool a Flex developer could have. It offers much more than a nice, easy way to compile your applications. It offers Flex developers code-hinting (great for learning, and speeds up seasoned developers), project organization, file templates, debugging, the Eclipse standard outline views, integrated help, and as it’s built on Eclipse, support for various plugins. So, as I use Subversion for version control, Flex Builder can integrate with Subversion via the Subclipse plugin.

Flex Builder is available in two flavors: a standalone version, and an Eclipse plugin version for those already using Eclipse. I currently use Eclipse with FDT for ActionScript 2.0 development, and I love it. If you’re still working in AS 2.0, I highly recommend FDT. As I’ve already been using Eclipse, I first decided to install Flex Builder using the plugin version. It worked, but I noticed that sometimes Eclipse seemed to get confused, and would throw errors when trying to switch between AS 2.0 development, PHP, and Flex. My install of Eclipse has several plugins installed: Subclipse, PHPEclipse, FDT, CFEclipse, to name a few. So, I’m not sure if the problems I was having once I added Flex Builder into the mix were due to Flex Builder, or a conflict somewhere between all of the other plugins. They just didn’t seem to get along that well. So, I uninstalled the Flex Builder plugin, and reinstalled it as a standalone version.

I’ve been much happier with the standalone version of Eclipse. If you’re not already using Eclipse, this is the version I would recommend using. Even if you are already using Eclipse, I would still recommend using the standalone. As the standalone version only includes the portions of Eclipse actually needed for Flex Builder, it launches much faster than standard Eclipse. Also, with today’s hard drive capacities, the extra space consumed by (technically) having two installs of Eclipse is not an issue. As there is no price difference between the two versions, you won’t save money buying the plugin version. When you receive your install disc of Flex Builder, you are presented with the option to install either version, and can switch at any time if you like. Once you make your choice, it’s not set in stone.

So, as a Flex developer, why should you plunk down $500 for Flex Builder and not use the free tools available in the SDK? Well, if you work under a deadline, which if you’re a web developer, you do - speed. Flex Builder is designed to make your Flex development time as painless as possible. It helps you to keep your projects organized so that your files are easy to find. When it comes time to create a new component or ActionScript 3.0 class, it provides a template to get you started in writing your code. Flex Builder also provides code-completion and code-hinting. When trying to learn Flex or AS 3.0, it is an incredible help when you’re really not sure what all the parameters of a particular method is, or what attributes are need for a certain MXML tag. These hints appear as you type, making completion as easy as hitting ‘Enter’ when they appear. One of my favorite features of this code-hinting is that it also works with your code. Those with photographic memories may not have this problem, but as a project gets bigger, I tend to forget exactly what parameters some methods of a class I wrote a month ago are needed. Flex Builder is smart enough to provide these hints not only with the built-in classes, but your code as well.

Another feature of Eclipse that Flex Builder has incorporated is the Problems pane. I love this thing. Basically, whenever you save your project, Flex Builder does a quick build of your project, and lets you know if there are any problems with it. You don’t always need to wait until you launch the app to find problems. It can’t debug for you, and tell you why your code doesn’t do exactly what you want it do, but it will immediately let you know if you’re trying to send a method a string when it expects a number, or when you’re trying to access a variable that doesn’t exist. You’re not going to get that with a plain text editor.

Flex Builder has two basic views for viewing your projects. A code view, which (of course) is used for writing code. This is where you’ll probably spend the majority of your time. The other view is the Design view. This displays the current state of your application, and allows for quick layout work. You can drag a component from the Components panel, and quickly position your design elements on the stage. As you do this, the MXML code is written behind the scenes, and you can switch to Code view at anytime to see what’s going on. I love this feature as it’s a great learning tool. If you’re not really sure how to set something up layout-wise via code, put it together in Design view, then switch back to the code view to see what the code for that layout looks like. Clicking on an element in Design view allows you to use the Properties panels to quickly set any styles, assign id attributes, or assign any other properties from one quick and easy panel. If you’re a seasoned Flex developer, or, like me, more of a beginner/intermediate, this design view is a great timesaver. I’ll use Design view to quickly layout the elements of my application, assign properties, and then switch back to the code view for the tweaking. While in design view, you’ll also have access to the components panel, for quick access to all of the built-in Flex components, but also any custom components you’ve created for the application, or any libraries you may be using. Design view also offers an outline view, that will allow you to quickly navigate through your application - it draws borders around layout containers on the stage, and can show you how various elements are grouped together.

For you budding Apollo developers, Flex Builder 2.0.1 also has the ability to help you develop Apollo apps. When you download the Apollo SDK, you’ll have the option to download a version of the SDK for Flex Builder. This will add the ability to create and manage Apollo apps in Flex Builder, and export them as well. It works really well. As Apollo improves, so will this feature.

For all of the great things about Flex Builder that I love, there are still a few improvements though that I would love to see. They aren’t major issues, and won’t impede your development, but they’d still be nice nonetheless. First, I’d like to see more options for the syntax highlighting and formatting. I’m not a big fan of the color choices used by Flex Builder. Anyone who has seen my code knows that it’s pretty colorful. It’s pretty bright and colorful, but I like it. There’s currently no ‘official’ supported way to customize these colors in Flex Builder. There are ways to adjust them by tweaking various XML files in your Flex Builder install, but it falls into the realm of unsupported, use-at-your-own-risk behavior. I’m also not a fan of the way that Flex Builder does some of it’s code formatting. It’s not a huge issue, but when you’re a little OCD like I am about how your code looks, and exactly where your curly braces are placed, or the spacing between things, it’s a little irritating.

The other feature I would love to see is some better ASDoc integration in Flex Builder. As of Flex Builder 2.0.1 and Flex SDK 2.0.1, the ASDoc tool is included for generating documentation files of your code. The HTML files generated are almost identical to the HTML docs used on Adobe’s LiveDocs site for Flex. When you’re working on a big project, or with multiple developers, good documentation is essential. While Adobe was kind enough to give us ASDoc, they weren’t so generous with the instructions on how to use it. It’s a command-line based tool, and through Google, I was able to find instructions scattered across various blogs and in the Flex documentation online, but for the most part, they seem to want you to figure it out on your own. Once you get it working however, it’s an awesome tool. Hopefully, the next version of Flex Builder will have some sort of built-in integration for ASDoc that doesn’t require third-party plugins, or the use of ANT.

The final issue I have with Flex Builder is it’s use of the older style globe icon of Macromedia Studio 8. It’s not a big deal at all, but at least there’s an easy fix for that. ;)

So, if you’re really serious about Flex/ActionScript 3.0 development, Flex Builder really is the way to go. I had originally planned on toughing it out using the Flex SDK, but the $500 you’ll save isn’t worth the time that Flex Builder will save you. Once you use Flex Builder, you’ll never want to go back.

Book Review - ActionScript 3.0 Cookbook

Tuesday, February 6th, 2007

Review by Josh BuhlerActionScript 3.0 Cookbook Cover

Book Details:

  • ActionScript 3.0 Cookbook
  • Joey Lott, Darron Schall, & Keith Peters
  • O’Reilly Media, Inc.
  • List: $39.99 Amazon.com: $26.39
  • ISBN: 0-596-52695-4
  • 556 Pages

By now, most Flash developers know that ActionScript 3.0 is a huge improvement over ActionScript 1.0 & 2.0. These improvements come in the form of faster performance, enhanced features, and the general awesomeness that comes with using the AVM 2 in Flash Player 9.

However, one of the biggest hurdles in using AS 3.0 is learning it. There are many similarities between AS 2.0 & AS 3.0, but for all the similarities, there are plenty of differences. If you’re an experienced Flash developer, fluent in AS 2.0, you’ll be able to pick up AS 3.0 fairly easily. The biggest trick, (at least for me) is learning the new way to do things in AS 3.0 that have become second nature in AS 2.0. And that’s where the ActionScript 3.0 Cookbook comes in.

(more…)