Developing for the Blackberry Playbook with Flex

In early March, I noticed RIM’s offer to develop an app for their new tablet, sportily named ‘The Playbook’, by March 31 to win a free device. Because I wanted to try out Adobe’s new 4.5 mobile SDK anyway and because I am very cheap, I decided to give it a try. The quick summary: RIM’s tools and processes are very much still in beta but they show promise and for the most part, I enjoyed working with them.

Getting Started

Coverage of RIM’s offer and development for the Playbook in general has been pretty much dominated by one negative blog post. I’m glad the author wrote it, because he seems to have single-handedly motivated RIM to change some of their ridiculous rules, like requiring a notarized identification. But still, it’s a little strange to see that one and only blog post cited in article after article. I guess it fit well into tech writers’ favorite memes on RIM.

The author complains a lot about setting up your development environment and it is definitely a chore. It’s not one clean install process and you do fill out a lot of forms. RIM cobbled together its own sdk and configuration with an IDE from Adobe and a simulator from VMWare and it shows. There are many little steps that all have to be done to get everything up and working. On the other hand, both main pieces of the environment are solid and already have a wide base of users.

Tools

For the most part, I liked the simulator. I’ve only tried Blackberry’s old simulator for phones a few times, but it seemed almost unusable. You can see why RIM went with a real virtualization tool this time. The Playbook simulator a lot faster and more responsive for me than Android’s virtual device. Apparently at one time you had to buy VMWare’s Fusion product, but when I went through installation, you just had to get the free VMWare Player, which I happened to have already installed.

One downside is that the connection between the IDE and the simulator is not as integrated as you’d like. You have to set up an ip address and password for it. And there are a few bugs. Once in a while during debugging, the simulator window will hold focus even though the Flash Builder window had been brought to the front. And you have to hit Alt-cntl to move your cursor off the simulator. Or maybe there’s a solution for that, like vmware-tools for running a Linux vm, but I didn’t see it documented.

Adobe Flash Builder is, of course, just an Eclipse plugin and has the strengths and weaknesses of Eclipse. Most importantly, it’s well-known to many developers. This version, 4.5, is in beta and that does show at times, but I found it to be pretty stable. Adobe is also hoping to build momentum for using flex to build Android apps, which I might try out next.

I don’t know how feasible it will be in reality to develop an application to run on Playbook, Android, and AIR, but at the very least, there should be a lot of opportunities to share code, as long as performance on Android is decent. The biggest downer about Flash Player is just that it’s not free. My 60-day free subscription runs out in 26 days and I somehow doubt revenue from my app will cover the cost.

Development

When I first started doing some test apps, I didn’t realize that the new QNX actionscript APIs were not entirely integrated with the flex mobile SDK. The docs lead you to create a mobile actionscript project, but anyone accustomed to flex development immediately misses mxml. If you create a regular Flex Mobile Project, though, it’s hard to use the QNX libraries, which provide some key functionality.

For example, RIM wants to establish that swipe gestures from the top bevel down brings up an application menu, but that’s a qnx.events.QNXApplicationEvent and you can’t listen for it with just flex. Fortunately, the forums are quite helpful (more so than the official docs) in coming with work-arounds for this and other problems. I would expect that RIM will continue to work on presenting a more seamless SDK for developers (they better).

I do like, though, the choice of actionscript. With its nearness to javascript, it’s a far more appropriate language for this kind of development than java. And the language itself is essentially open-source with a free-of-charge spec and open-source compilers and virtual machines available.

I found the QNX information lacking enough that I just treated my app as an AIR project then added in Playbook events, like swipe down, where necessary. I ended up with something that really feels too much like a web app. That might be inevitable when you’re developing without a real device. Not all the touch events can be simulated with the simulator so there’s a limit right now to what you can test.

The vendor application and app submission process was, like setting up the development environment, tedious but not hard. I almost didn’t get my vendor registration done in time. But I did end up getting everything submitted with two hours to spare on March 31.

So did I qualify for a free Playbook? I don’t know. I’ve gotten confirmation that I completed the first step, but not yet heard if my app has been approved for App World. I have to admit, my app seems more like the result of a learning exercise (which it was, after all) than a polished application. But then, with no device, a simulator that can’t simulate all the real gestures and actions, a  beta IDE, and minimal documentation, it’s bound to be a little rough. At least that’s what I tell myself.

This entry was posted in flex, software and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>