What is the best cross-platform mobile framework out there?
Let’s take a look at the main three competitors.
First of all, cross-platform compatibility is all about compromising on the native look, feel and features of devices. Therefore, if you’re looking into creating a 3D game or an interactive, multimedia, animated app, you’re looking in the wrong direction.
PhoneGap, Titanium and Rhodes are all based on web technologies and are aimed at web developers that want to leverage their current skills set to the mobile apps world.
PhoneGap and Titanium use HTML, CSS, and Javascript. They both provide Javasript APIs to access the native features of the device (GPS/Geolocation, Vibration, Accelerometer, Sound…). Rhodes instead is based on Ruby and inspired by Rails. It provides a full server environment on the device and provides access to native features of the device through this environment.
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 PhoneGap javascript APIs, the “web app” has access to the mobile phone functions such as Geolocation, Accelerometer Camera, Contacts, Database, File system, etc.
Basically any function that the mobile phone SDK provides can be “bridged” to the javascript world. On the other hand, a normal web app that runs on the mobile web browser does not have access to most of these functions (security being the primary reason).
The Titanium website states “While Titanium applications are written using HTML, CSS and JavaScript – they are compiled into native applications (dependent on the mobile device) and run on the device as standalone applications. These applications have a very powerful API for accessing mobile features such as GPS and Camera, on-device Databases and other awesome features.”
This statement does not mean that Titanium can compile your html, css or javascript code into “native” code. They are packaged as resources to the executable bundle, much like an embedded image file. When the application runs, these resources are loaded into a UIWebView control and run there as javascript.
This is done the same way in PhoneGap as well. From architectural standpoint, these two frameworks are very similar. So what about the differences?
Most noticeably, 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 (but their WIKI also lists Nokia’s Symbian and Maemo as well as Palm’s WebOS). 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.
So, 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.
How does Rhodes fit into the picture?
“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 one time and they then run on all major mobile device operating systems: iPhone, Windows Mobile, Blackberry and more.”
Rails developers will have a quick start with Rhodes and be able to get productive in a matter of days. The framework also has its limitations though. No audio and video support make it suited for data-based apps only, and while you can extend the framework using native calls to the APIs for each device for the parts of the app that require access to features not supported by the framework, it doesn’t necessarily mean that these will work smoothly.
Moreover, developing the native calls for these features exposes the developers to the native SDK and environment and therefore take away the main point of using a cross-platform framework in place of the native SDKs (learn once, write once, deploy on all).
Another advantage of Rhodes upon the other two is RhoSync. RhoSync retrieves data via web services (REST or SOAP) from backend enterprise applications for distribution to downstream mobile devices. It keeps a master store of all enterprise application data and keeps track of the information that users have received. It is written to be far simpler to deploy and configure than similar technologies that have come and gone over the past decade.
This doesn’t mean you cannot code against web services using PhoneGap and Titanium of course.
Finally, another differentiator is the licensing for each of these frameworks.
PhoneGap is open source and free for all to use.
Titanium is free while it is in beta, but will become a commercial product.
Rhodes is a commercial product and costs 500 USD per project, to be paid upfront before you start the development.
Surgeworks has been an early adopter of Rhodes. Even though the technology was the most mature at the time, it did present our developers some surprises and several challenges. The framework has been evolving very quickly: many issues have been fixed since our first approach with it.
Our Rhodes team (Brad Midgley being the project manager and Radu Cojocaru being the lead developer) is actively contributing to the framework evolution by submitting patches. Our first project built in Rhodes should hit the store some time in February.
At the same time, we’re keeping a close eye on PhoneGap and Titanium. I tend to prefer PhoneGap between the two because it is an open technology and supports more platforms.
Now back to one of my initial sentences, about making cross-platform games and multimedia apps. We’re all waiting to see the time in 2010 when Adobe will manage to release Flash CS 5 to build iPhone Apps and there is a hope that some follow up, expensive upgrade (CS 5.5?) will support building native apps for Android and BlackBerry, but until then, you’d better forget about cross-platform games and multimedia apps. I know there’s flash Lite, but can you package that in a native Android and BlackBerry app? and will that compatible with Flash CS 5 iPhone environment?… Too many questions to adopt this technology today.
If you’re looking into cross-platform 3D games, you should check out Unity. They currently only support Mac OS X, Windows and the iPhone… but I bet that support for more mobile platforms will follow in 2010.



Where Technology and Religion Collide
iPod Touch 4th Generation, iPad revision and new mysterious iDevice coming in autumn
How to install QuickTime Player 7 on Mac OS X 10.6 Snow Leopard without the DVD
Copy of an NSObject subclass
Android iPad knockoffs… pass
Nice summary. I see CS5 as a potentially useful tool for existing flash code bases, but it remains to be seen how this will come together.
I have not been excited with the prospect of writing entire applications in javascript. I’ve written advanced UI in the javascript-enabled cappuccino but its design helps enforce MVC separation like full cocoa development does. I haven’t seen people talk about how MVC applies to Titanium and Phonegap. It would be interesting to hear opinions. Rhomobile helps put things together in a rails-like separation of concerns.
All these platforms are new enough that automated testing hasn’t caught up. I miss this from pure rails development.
Titanium has an IDE which allows you to create and run projects (you don’t need to open a terminal) and it wins from the documentations point of view (there are a lost or resources, from video to a clear list of functions in its API).
Hi Mauro:
Can you please comment on the acceptability of iPhone applications based on PhoneGap?
http://www.readwriteweb.com/archives/why_is_apple_rejecting_phonegap-built_iphone_apps.php
Also, do you have any information regarding this problem with Titanium or Rhomobile. I look forward to your response.
Thanks and Regards,
Rohit
Hi Rohit,
We have no app published using PhoneGap and Titanium so far so I can’t tell you of any direct experience with Apple’s review process when using these frameworks. The first thing that comes to mind is that the post you reference is a little dated. As you see on http://phonegap.com/projects there are approved apps out there using PhoneGap.
There are a number of reason for apps rejection. Some are silly and inconsistent over time, but usually they make sense.
One could presume, with all due respect, that people using PhoneGap are trying to use it as a shortcut to success with the App Store, and in the process they just do not give the appropriated attention to Apple’s Human Interface Guidelines and to the terms every App needs to abide to in order to be approved.
Apple’s explanations often reference to these documents and sometimes it looks like these terms and guidelines can be bended to a certain degree, while some other times you get to a picky reviewer that will reject your app because you used an icon that looks like an iPhone or a word that does not please them (like “demo”… see Ivan’s post here).
We have several Rhodes projects in the pipeline and will surely keep everyone up-to-date of all the ins and outs of the approval process as we submit the first one to the App Store later this month… so stay tuned ;)
Thanks,
Mauro.
> Titanium is free while it is in beta, but will become a commercial product.
I’m not sure where you got this information. As far as I can tell, it’s apache 2.0 licensed and I don’t see any indications that they will change that. Also, on http://www.appcelerator.com/ , it says Free & Open Source.
Another reason why I’m tending towards using Titanium is that it will also support desktop development. With the iPad round the corner, the difference between desktop and “formerly mobile OS”-applications will probably become less clear…
OK, I read some more. To me it looks like there will be a free, open source, APL 2.0 licensed version of titanium, but that they’re selling premium subscriptions, that allow you to get your technology earlier, and support and the sort. I’m not sure this should count as a negative. Of course it’s bad if you’ll have to pay for iPad support because the free version will only have it 6 months later; on the other hand, when you pay you get support, and that’s something that could be very useful.
But we’ll have to wait until next week when the exact terms of the subscription and free services will be announced to be sure on whether the payment model is going to hold Titanium back.
Thanks for your review.
Rhodes allows plain HTML+Javascript development like all of its imitator framework (four more beyond the ones you reviewed)
But Rhodes is:
- only framework with support all devices
- only MVC (you nicely captured value of MVC and why writing an entire app in Javascript is probably not a good idea
- only ORM
- first mobile Ruby
- only hosted development environment
Rhodes 1.5 is alll about TDD and automated testing. Rhodes 2.0 will have stream multimedia support far beyond anything that exists today
[...] blog entry by mobile developer SurgeWorks from a few months back outlines one of the key differences: Most [...]
If you are going to cover the leaders in the field you should also cover QuickConnect. It was the earliest framework, undergoes faster development, and has a huge number of features and users. It is free and open using the MIT license.
Nice Article
A team composed of pasionnated guys own the unique technology to make agnostic cross-platform games on all major existing mobile platform. this revolutionary platform component is called Zeugame and allow to build the new generation of CPMMOG (Cross Platform Massive Multiplayer Online Game)
See their tutorial application World of Bombs at http://www.zeugame.com.
I think you need to revisit your description of Titanium works. Mobile projects are currently developed entirely in Javascript with no HTML or CSS, and produce native applications, i.e. they don’t run in the browser on the device. It is the only one that does this AFAIK.
Hello Alan, you may want to check out a follow-up post to this one I wrote a while back: http://surgeworksmobile.com/iphone/rhodes-vs-titanium-round-2