Month: June 2011

Trying out Adobe Flex for Mobile Development

Let me start by saying I have never developed using Flex or any Adobe tools.

I’ve heard a lot of mentions of Adobe’s tools for Android and iOS development and decided to give them a try. The first thing I thought I needed to do was download some tools and SDKs. Was it Flash, Flex, Flash Builder for making Flex apps, AIR…..Adobe doesn’t make it easy. In the end, I found a nice step-by-step tutorial here:

Turns out I needed Flash Builder 4.5, which allows you to develop Flex apps, and somehow AIR fits in here….beyond breathing of course. Actually, it provides the runtime for Android and ends up being packaged as part of the iOS app, acting as “captive runtime” (according to Adobe docs). I guess if you are familiar with Adobe tools, this is all obvious….but as I mentioned, my background is mobile development, not flex/flash development.

It was time to install the IDE. Flash Builder 4.5 is based on Eclipse….OK, maybe I can install an Eclipse plug-in instead. Turns out they do have an Eclipse plug-in, but you have to install their full version of Eclipse first, then you can install the plug-in into your version of Eclipse….WHAT?. So I downloaded a trial version of Flash Builder and installed it.

Following the Tutorial
The tutorial was well written and easy to follow. The only correction needed was the trends URL for twitter, which is this: There is a lot of clicking and code templates that come into play…and I am certainly no fan of coding in XML….I kind of feel dirty doing it. But the tools do provide some nice abstractions, like making it really easy to connect to an HTTP service and make REST calls and handle JSON or XML. They also have a pseudo emulator that you can use during development. It is incredibly basic, but you can do things like simulate rotation, let it act like different OS’s….but it really just looks like a headless browser window.

Next up, the part of the tutorial where you get to deploy the app to an actual device. This is the part I was waiting for. How would it perform? Can I debug? How does it work on iOS? All these questions were ready to be answered.

Running and debugging on an Android device was simple and worked fine. It was a different story for iOS. First you had to get your developer certificate in p12 format….hopefully you remember your password, if not you will need to re-export it from keychain. You also need you provisioning profile. Once you get this configured, you have to build the app for iOS, copy it into iTunes, sync your device so the app gets loaded, then run the app. Debugging involves all these steps, plus your development machine needs to be on the same network as your device and debugging occurs over WiFi. Really. And every time you make a change….delete the app from the device, rinse, and repeat. Really, really. It took me several IDE restarts and iOS device disconnect/reconnect cycles to get the debugging to actually work….but once it did…(insert sarcasm) well, it worked (end sarcasm).

On the devices, the app didn’t really perform that well. Scrolling was bit jerky and transitions seemed slow. Oh, and the tutorial neglected to give you a back button for iOS devices to be able to pop the view off the navigation stack. I’ll post a little work around/additional code for that separately.

In the end, the tools are OK. The language (MXML/ActionScript) is not my cup of tea. The performance on the devices was really mediocre. Not being a Flex developer, I am not sure if that can be improved…it was only a tutorial. I think for simple apps, this might be an alternative. If you are a Flex developer, this is definitely and option to allow you to create mobile applications. Will I use it, doubtful. I’ll stick to either native app or mobile web development.