By sebastian.sassi

Time ago, one of our customers asked us to implement a new web project with support for smartphones. The objective was to support the most common operating systems: iOS, android, blackberry, symbian, with the possibility of using the phone capabilities (gps, sound and vibration).
After researching on different frameworks and technologies we have arrived to some conclusions that I would like to share with people who have had the same dilemma of choosing a good framework to use.
I must say that this research was based on data taken from different sources (both official and unofficial), and also having taken some particular decisions while evaluating the alternatives, that do not have to match with your own criteria.

First of all, we classified the available options into two different categories:

  • ‘Native’ Development frameworks: Rhodes, NimbleKit, Titanium (this is new to the list), PhoneGap
  • Javascript libraries: Sencha, JQTouch, JQuery mobile

Rhodes

According to the official description, The Rhodes application framework allows developers to create native mobile applications with portability of editing HTML templates and the power of the Ruby programming language. Applications written in Rhodes exhibit the performance and richness of apps written to the native device operating systems with local data but enable developers to have the productivity of web interfaces in HTML. Developers write their applications once and they then run on all major mobile device operating systems: iPhone, Windows Mobile, Blackberry and more.

Advantages:

  • Programming in Ruby
  • Full access to the Device API (Application looks different in each device)
  • Several devices supported: IPhone, BlackBerry, Android, Windows mobile
  • RhoSync: RhoSync retrieves data via web services (REST or SOAP) from backend enterprise applications for distribution to downstream mobile devices.

Disadvantages:

  • Licensing: It is a commercial product. Costs arround U$S 500 per project.

NimbleKit

NimbleKit says that it is a framework to create applications for iPhone and iPod touch fast. Programmers do not need to know Objective-C or iPhone SDK. All they need is to know how to write an HTML page with Javascript code.

Advantages:

  • HTML, CSS & Javascript

Disadvantages

  • It only works for iphone, ipods & ipads.

Titanium & PhoneGap

From architectural standpoint, these two frameworks are very similar. Titanium and PhoneGap expose the smartphone features through a set of Javascript APIs, while the application’s logic (html, css, javascript) runs inside a native WebView control. Through the javascript APIs, the “web app” has access to the mobile phone functions such as Geolocation, Accelerometer Camera, Contacts, Database, File system, and so on.

The differences:

PhoneGap does not expose the native UI components to javascript. Titanium, on the other hand, has a comprehensive UI API that can be called in javascript to create and control all kinds of native UI controls. Utilizing these UI APIs, a Titanium app can look more “native” than a PhoneGap app. Second, PhoneGap supports more mobile phone platforms than Titanium does. PhoneGap APIs are more generic and can be used on different platforms such as iPhone, Android and Blackberry. Titanium is primarily targeting iPhone and Android. Some of its APIs are platform specific (like the iPhone UI APIs). The use of these APIs will reduce the cross-platform capability of your application.
If your concern for your app is to make it more “native” looking, Titanium is a better choice. If you want to be able to “port” your app to another platform more easily, PhoneGap will be better.

Advantages:

  • Multi device
  • Programming in HTML, CSS & Javascript
  • MIT License

Disadvantages:

  • Some devices native features are not exposed in the API

Sencha

According to the official documentation, Sencha Touch is the first app framework built specifically to leverage HTML5, CSS3, and Javascript for the highest level of power, flexibility, and optimization. They make specific use of HTML5 to deliver components like audio and video, as well as a localStorage proxy for saving data offline. They have made extensive use of CSS3 in our stylesheets to provide the most robust styling layer possible.
Altogether, the entire library is under 80kb (gzipped and minified), and it is trivial to make that number even smaller by disabling unused components or styles.

Advantages

  • Great UI Controls
  • Multi device

Disadvantages

  • Commercial license (U$S 1.800 for 5 developers)

JQTouch
It is “A jQuery plugin for mobile web development on the iPhone, iPod Touch, and other forward-thinking devices.” [1]

Advantages

  • Great UI Controls
  • Multi device
  • MIT License

Disadvantages

  • Is focused on small screen devices
  • It’s a jquery plugin
  • It was created in 2009 by David Kaneda and has been relatively quiet until release of beta 3 (April 24th 2011).

JQuery Mobile
It is a unified user interface system across all popular mobile device platforms, built on jQuery and jQuery UI foundation. Its lightweight code is built with progressive enhancement, and has a flexible, easily themeable design.

Advantages

  • Multi device (See https://jquerymobile.com/browser-support/) (supports much more devices than JQTouch)
  • Very simple to use
  • John Resig, JQuery’s founder is one of the main developers and it is a high activity project
  • It is not a jquery plugin, it is a new framework
  • Dual licensed under MIT and GPL Version 2

Disadvantages

  • It is still in Alpha version

CONCLUSION
After evaluating the different frameworks, we arrived at the next conclusions:
We should use a framework that generates html + css + js, because this technology guarantees a long term support on different devices
We should use a framework that supports access to devices specific capabilities (i.e. sound, gps, camera, vibration, data, etc.) in case we need them in a near future
Because we prefer unrestrictive licenses (MIT, BSD, LGPL and others) our options are reduced to: PhoneGap, Titanium & JQTouch.

Finally, we choose PhoneGap + JQuery mobile because they are open technologies and support multiple platforms. Also, resulting interfaces are similar across different devices and that is a desired feature for our users.
JQTouch and JQuery mobile are awesome frameworks to develop mobile applications, but we prefer to choose JQuery Mobile since it support much more devices (altough it is in alpha version), has high activity and is not just optimized for WebKit as jQtouch does.
We also think that JQuery Mobile is pretty easy to use, the resulting interfaces are usable and has many components to use.

The rest of the story is pretty easy ( just because we use Ruby on Rails 😛 ), you should create some helpers that adds the JQuery Mobile features to the pages, or use some existent plugin, you can find a starting guide here: http://goo.gl/5Soyq.

I hope you find this post useful, have a nice coding!

[1]: forward-thinking: Someone who is forward-thinking is thinking progressively and possesses the ability to look beyond the “now” and formulate strategies for future success. They are constantly asking “what’s next?”.

Sources: