Labs
On mobile cross-platform frameworks
Theoretically, the idea of cross-platform mobile applications is very good – by deploying one application on multiple platforms there is much work effort to be saved. However, the reality appears to be much more complex – even when using frameworks designed for it, it is hard to achieve the same look&feel and functionality on different platforms. It is also hard to build the application, because each platform requires their own SDK and tools, and one requires also different Operating System (iOS app can be built and deployed only on Mac). Below you can find a comparison of two cross-platform frameworks (RhoMobile, PhoneGap) as well as pros and cons of three leading mobile environments (Android, BlackBerry, Windows Phone).
Cross-platform frameworks
RhoMobile
RhoMobile is a whole package of tools for development and deployment of cross-platform mobile applications. It contains RhoStudio (IDE based on Eclipse), Rhodes (Ruby-based MVC framework for native applications), RhoConnect (Ruby-based solutions for synchronization between mobile and server) and RhoHub (cloud solution for deploying for multiple platforms at once).
I have started development of my application from this package and, even though I switched to other solutions, RhoMobile still looks very promising. The reason why I resigned from it is that it has no support for adding photos to device contacts. All other features of it seem very interesting, also because it utilizes a very good language – Ruby.
| Pros: | Cons: |
| + Complete package of tools+ No need to have different environments and systems when using RhoHub+ No need to design communication and authentication client-server – RhoConnect does it for you
+ Supports “push” mechanism + It is more about programming than web developing |
- Does not have all native capabilities (e.g. contacts photos)- RhoHub cannot be used in every case for security reasons (app needs to be uploaded to the cloud)- Requires at least basic knowledge about Ruby |
PhoneGap
PhoneGap is a HTML5 app platform which allows to author native applications with web technologies and get access to APIs and app stores. PhoneGap API is written in JavaScript and provides access to e.g. native contacts, storage, notifications and many more.
The main idea behind every PhoneGap application is that having a PhoneGap environment configured for each platform (e.g. Android, BlackBerry, Windows Phone), it is possible to use the same assets/www directory in each of them to achieve the same effect.
However, environment configurations are different for each platform and PhoneGap JavaScript API differs also which can be tricky, because it is a part of mentioned assets/www directory. PhoneGap does not have a completely unified interface for every platform, the quirks are visible especially in Contacts API, where even fields can be treated different on each device.
| Pros: | Cons: |
| + Based on well known HTML + JS+ Supports many native features+ Well documented | - Too many quirks between platforms- Needs environment set up for each device- Most of methods are asynchronous which can be hard when processing a linked set of data |
Mobile Environments
Android (Eclipse ADT + Android SDK)
| Pros: | Cons: |
| + Eclipse is a well-known platform for developers+ Mechanism of virtual devices | - Emulator is very slooooooow- Requires “kill adb.exe” hack to work- Many bugs in emulator |
BlackBerry WebWorks (Ripple)
| Pros: | Cons: |
| + Ripple has built-in web preview which allows to see the app without building and deploying+ Web Inspector available+ Emulator looks like a real phone (you can download simulator for any model you want)
+ Emulator runs fast + It is BlackBerry :-) |
- Ripple is still beta- Emulator loads slow |
Windows Phone (Visual Studio)
| Pros: | Cons: |
| + Visual Studio is a well-known IDE+ Emulator loads and runs really fast+ Many debug tools available | - Emulator has no tools/options inside (there is only Internet Explorer available)- Windows Phone is still far beyond other mobile platforms in terms of standards support- Weird policy regarding contacts – it is not possible to add or update contact without user’s interaction |
Conclusions
Although the idea behind cross-platform mobile applications is very sublime, there is still much work to be done for the available solutions to exploit the capabilities. All platforms are still under development, tracking systems are full of reported bugs and requests for future versions. While versions are rapidly changing, documentation is sometimes insufficient.
Generally, the simple web application can be deployed as a native app for most of platforms without any (or only slight) changes. However, when it comes to use native smartphone functions, there arise changes between each system. I was not able to test the app under iOS, but according to online discussions, it is iOS and Android which are leaders of developer-friendly environments. These both systems almost fully implement web standards and differ only slightly between native abilities (mostly due to architecture differences). Then comes BlackBerry, which newest 7.0 OS version has almost all capabilities of the top two. Windows Phone 7 (Mango) is far behind them. In the end of cross-platform supporting systems are Symbian and Bada.
The good practice which saves much effort in developing mobile application based on HTML5 is to test it first without mobile (and native functions). It is much faster to tweak look&feel on any webkit-based desktop web browser (e.g. Google Chrome), than building and deploying app to device each time a single character was changed. Then, when the display is satisfying, you can test it on the mobile (device or emulator). The last step should be to implement native functions like e.g. interaction with device contacts or camera and GPS support.






