mobile-icon

A Brief Comparison of Titanium and PhoneGap for Cross Platform Mobile Development

| 5 Comments

Appcelerator Titanium and Nitobi PhoneGap are open source frameworks that allow web developers to use their existing skills to create applications for mobile devices. They work in different ways and so I was interested in investigating whether one had significant benefits over the other.

Although iOS isn’t the only platform available, there are more iOS devices in use than any other. Until a recent change in position from Apple, it was not possible to use third party authoring tools to create an iOS app and sell it through the App store. This restriction was mostly targeted at Adobe and the Flash platform, and both Titanium and PhoneGap, being web-standards based, had found ways of effectively working around this restriction. Even so, there was always a risk that apps authored in anything other than the iOS SDK may get rejected. Now that Apple has relaxed its review process, it means that the use of solutions such as Titanium and PhoneGap become all the more appealing.

Benefits:

  • Web developers can leverage existing skills without having to learn native languages and authoring environments from scratch.
  • An app can be written in one set of languages and deployed to multiple mobile platforms (not just iOS) with relative ease.

Disadvantages:

  • The legal position of using third-party tools could always change, meaning the future removal of your app from a store/market is a possibility.
  • Generated code is not as efficient as natively authored app, so performance is not as great.
  • You do not get access to the full range of features offered by native SDKs.

Appcelerator Titanium

Appcelerator Titanium

http://www.appcelerator.com/

How it Works

Titanium allows the development of mobile apps using HTML, CSS and a JavaScript API which is used as a bridge to the platform’s native API. This gives developers access to a range of native UI elements and hardware features using JavaScript. The final app consists of compiled native code that is executed by JavaScript at runtime.

Platform Support

iOS, Android (RIM to come)

Device Hardware Support

GPS, Vibration, Accelerometer, Compass, Camera, Microphone

Native UI Support

Yes

Performance

Not as good as a native app, but better than PhoneGap since native code is produced.

Installation Requirements

Titanium, Platform SDKs, Java SDK

Nitobi PhoneGap

Nitobi Phonegap

http://www.phonegap.com/

How it Works

Developer creates app using HTML/CSS/JS, including JavaScript classes that give access to device hardware and other iOS API featurs. The final app is wrapped within a platform native ‘Web View’ browser object, and essentially becomes a stand-alone web app, along the lines of site-specific browsers such as Fluid and Prism, but with the ability to access some device-specific features.

Platform Support

iOS, Android, WebOS, RIM, Symbian

Device Hardware Support

GPS, Vibration, Camera, Microphone, (plus Accelerometer and Compass on some devices)

Native UI Support

No, although there are attempts to fix this.

Performance

Not as fast as Titanium since everything is rendered within a ‘Web View’ browser object.

Installation Requirements

Ruby, Java SDK, Platform SDKs, PhoneGap

Conclusion

Titanium appears to offer a more robust solution, as the end results are much closer to a natively authored app, but it has limited platform support. If you have a specific need to author for VIM, WebOS or Symbian devices, then PhoneGap is your only option out of the two, although it may not give you access to all of the device hardware that you require. If you are only really interested in iOS and Android devices, which between them have the largest share of the market, then Titanium appears to be a better choice.

If you enjoyed this post, please consider sharing it using the above buttons, leaving a comment or subscribing to the RSS feed.

5 Comments

  1. You ought to seriously think about expanding this site into a major player in this field. You obviously have a concrete understanding of the topics all of us are browsing for on this site anyways and you could potentially even earn a dollar or three from some ads. I would dive into following recent trends and raising the volume of articles you make and I bet you’d start earning some great traffic soon. Just a thought, good luck regardless!

  2. Helpful blog, bookmarked the website with hopes to read more!

  3. Titanium does NOT compile JavaScript into “native” code.

    • @ArtfulDodger, by “The final app consists of compiled native code that is executed by JavaScript at runtime” I did not mean to suggest that Titanium can directly convert JavaScript into, say, Objective-C.

      I have to admit that after doing a reasonable amount of research I still don’t fully ‘get’ how Titanium works, but my current understanding is that it creates a package that contains native objects that can be accessed through a JS API.

      The quoted sentence could have been phrased better and use of the word ‘compiled’ is perhaps misleading, so has been amended to reflect this.

      If anyone feels that my summary is still inaccurate, please feel free to let me know.

  4. There is an exciting new kid on the block – Application Craft. You should look at the Phonegap case study : http://phonegap.com/case_study/phonegap-application-craft-pain-free-mobile-app-development/

    Suggest you add this into your thinking (I completely realise you wrote this a while ago!). It’s actually a lot more than a framework. It’s a complete IDE with UI and Code editing and incorporates both Phonegap and JQuerymobile. Bit like a cloud based Visual Basic for mobile and desktop apps.

Leave a Reply

Required fields are marked *.

*


Spam protection by WP Captcha-Free