Update 12th July:
Actually people are able to get around 60fps speed on Apple and Android devices using AIR framework. Which means that AIR based apps are as fast as Native apps
ref: http://www.flashrealtime.com/circ-game/
Currently, Mobile Application development is one of the hottest areas in software development.
Industry is looking for tools which can deliver on single code base and rapid development for multiple mobile platforms. iPhone and Android being the most important of those platforms.
If you or your team is thinking of Native vs. HTML5, this is not the post you want to read. Michael Mahernoff has written a wonderful article about that subject here.
I am going to share in this post my experience with developing cross platform native mobile apps using Adobe AIR and HTML5 with PhoneGap.
I have developed and submitted three mobile applications so far
| App Name | Tool Used | Links/Platforms | Downloads |
|---|---|---|---|
| Desi | HTML5 with PhoneGap | Android iPhone Palm Web |
10,000 |
| Ragalahari | Adobe AIR | Android | 4,000 |
| ColorPuzzle | Adobe AIR | Android iPhone(in process) |
600 |
| ColorPuzzle | HTML5 | Web | NA |
Here are my learnings
For a simple mobile app like Desi which has just one screen and has a very simple interface, Adobe AIR is an over kill and should not be used.
Ragalahari is an application which has decent amount of screens and some of those screens need rich UI like navigating through galleries, music, and videos. This app gets its feeds from webservice calls and caches data locally for each launch.
I developed Ragalahari using Adobe AIR but, building it using HTML5 and JQuery Mobile or Sencha Touch would have taken a little more time because even though there are tools like DreamWeaver and Ripple which help in HTML5 development for mobile, Adobe’s Flash Builder 4.5 is much more mature and easy to use.
On the other hand, if I had used HTML5 to develop Ragalahari. It would be time taking but, easy to port this app to other platforms like BlackBerry, Symbian, WindowsPhone7 and Palm. Going forward, it is in the best interest of each mobile platform to improve their browser where as no one except Adobe has a big gain in supporting AIR/Flash on all mobile platforms.
ColorPuzzle is a simple number slider like puzzle/game, user will tap on little colored tiles to move them around in order to complete the puzzle. I would not recommend using HTML5 to develop games/apps like this one, may be in future when the mobile browser is as capable as desktop web browser, Sure.
Reason is, if I use Canvas specification of HTML5 to draw the puzzle, it will work efficiently in all mobile browsers but, I cannot attach tap events to each tile since canvas elements are not DOM objects.
So, if we need to use canvas for interactive elements, we need to capture the x and y of user’s tap and figure out on which element user tapped (in my case to figure out which tile user tapped on).
In normal web world we use SVGs to develop this kind of interactivity in browser but, for mobile, Android’s browser does not support SVG yet. Also animation and drawing is very slow on mobile browsers. The speed we get with the AIR on both Android and iPhone is around 20 fps (frames per second) which is sufficient for this app.
Watch this video to understand the low performance of Mobile Browsers when it comes to animation and drawing
http://www.youtube.com/watch?v=DUWo19BcC7s
Also, here is a good place (apart from Adobe’s articles) to start understanding how to develop optimum Adobe AIR code for Android and iPhone
http://www.roguish.com/blog/?p=214
So, my analysis is, if your Mobile App has significant drawing and animation which needs to have interaction with users, HTML5 is not the way to go.
However, if your app is mostly text based content with CSS based simple animations and effects, AIR or Flash based solutions are an overkill.

