Welcome!

Adobe Flex Authors: RealWire News Distribution, Shelly Palmer, PR.com Newswire, Corey Roth, Matthew Lobas

Related Topics: Adobe Flex

Adobe Flex: Blog Feed Post

Adobe Flex Development - Personal Retrospect

Last year, I started writing a small application using the Adobe Flex SDK

I occasionally start small projects for friends or family. I intentionally use technology I have not used before in order to learn new things. The client gets something, I learn something new. It's nice also, because it forces me to finish the projects.

Last year, I started writing a small application using the Adobe Flex SDK, (version 4, even though it was just beta when I started). The app simply streams audio and flips slide images, a Flex/AS3 component, or a customizable automatically-generated questionnaire/quiz at defined timestamps. All of this is configured through a reasonably small XML file, all via the network.

The first problem I ran into was finding a decent development environment. Adobe's Flex Builder, (based on Eclipse, now called Flash Builder), had few nice features but also some things I couldn't live with. For what it provided on top of basic Eclipse, which was almost nothing, the price was robbery.


Problems with Flash Builder 4
  1. It hid some of the build details too much. Flash Builder provided almost no help in writing an appropriate build/ant file. Since I wanted to be able to build from the command-line, it was not very useful to me. Lesson: Don't expect Flash Builder to jumpstart you if you are a power user. Once you leave the dock, you'll need to paddle.

  2. Flash Builder had no source code formatting for ActionScript, other than automatic indentation as you enter it. I don't want to spend my time formatting all of the code. I found several options, the best of which was a plugin for Eclipse/Flex Builder. However, they were all based on older versions of Flex and ActionScript 2, which had significant changes in Flex 4 and could not be used. Lesson: I am sure they will support this, if Flash Builder 4 doesn't already support it in the current build, because without source formatting (i.e. you just refactored and indentation is no longer consistent), development is annoying.
Alternative Flex Editors
After several hours, I realized that my favorite Java IDE, Intellij Idea, supported Flex files. It even provided Source Code formatting for ActionScript 3. Since I had to write the build scripts/xml anyway, Intellij Idea turned out to be the ideal environment. As a mac user, TextMate is also pretty good, but at the time, still no easy source formatting for the latest ActionScript was available.

I was pretty surprised that IntelliJ was the best option, for Flex 4, at the time. I could debug, build, format source, run tests. I had more functionality from a third party, for a fraction of the price, than from the vendor alone.

Problems with Flex 4, ActionScript 3
As if tracking down suitable development tools wasn't time-consuming enough, there are several traps in Flex/ActionScript that make the experience a little more bitter for a newcomer.
  1. Many calls in ActionScript are asynchronous and have to be designed with concurrency in mind. The problem is that it's not always completely clear which calls are async. You can safely say that IO calls, such as HTTP and File requests, are async. Many things that I expected to be synchronous, (next line of code doesn't execute until the current line is done), were async, due to one or more of their dependencies being async. Lesson: Just use events (callbacks would be better) as much as possible. I got much better at this, but even examples in Adobe's live docs, (the main cause for my headaches), were only applicable in certain cases and very misleading.

  2. I hit a few bugs, where certain features I was using could only be called in certain ways, not in all of the ways shown in the docs. And that was fine when I was using the beta SDK. But in the fall of 2010, when I finished up, Flex 4 was released, I expected less issues. Lesson: Stay glued to the forums. Unit Test your code.
Summary
I don't have many issues anymore, although I still use Idea to develop instead of Flash Builder. My experience was a first impression. I mostly got over the language, SDK problems, much of it my own design errors. But Flash Builder needs some serious improvement.

As simple as my app was, I think it had a few aspects that forced me out of my shell and it didn't give me a server backend to depend on as much, as the client is (capable of) doing more. It's quite possible that I was a tad ambitious for a first app.

Unfortunately, I waited months to finish this post so I'll have to come back with the specific bugs/issues with the language, after reviewing my notebook.

Read the original blog entry...

More Stories By Jason Alexander

Unix Administrator for seven years. Software Developer for four years. Java, Groovy, Scala and more. Fan of the Pragmatic Bookshelf and continuous improvement.