by Mauro  Dalu
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.
Tuesday, June 22, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment