The great framework battle: PhoneGap vs Titanium

One of the most common discussion topic among developers when planning to develop any mobile/web app is selection of right framework. There are various HTML5 frameworks that help developers by providing CSS styling and APIs to cut short the pain of dealing with HTML5. When it comes to development of mobile apps, there are two famous solutions for cross platform development, PhoneGap and Appcelerator Titanium.

Architecture
PhoneGap is HTML/JS/CSS. PhoneGap is not just a native wrapper of a web app. Apps developed using PhoneGap are web apps running inside a UIWebView control. Through PhoneGap API, the “web app” has access to the mobile functions such as geolocation, camera etc. On the other hand Titanium doesn’t compile your HTML, CSS or Javascript code into “native bits”. They are packaged to resources as executive bundles much like an embedded image file. When an application runs, these resources are loaded into a UIWebView control and run there as Javascript code. From architectural standpoint these two frameworks are very similar.

Flexibility
Apps build using Titanium are native and they can’t be reused among different platforms. Code once, deploy everywhere. PhoneGap promotes code reusability and portability so that same code can be deployed among different various mobiles, tablets and TV with minimal change.

Performance
One advantage of Titanium over Phonegap is that Titanium provides access to device native UI functionalities, which means Titanium apps are native apps developed using web technologies. PhoneGap does not expose many UI components to the JavaScript. Apps developed using PhoneGap are web apps running inside a UIWebView control. Titanium Apps become native apps whereas PhoneGap apps start their life as WebApps and die as web apps.

Licensing
Phonegap is MIT licensed and Titanium is Apache licensed. How that help in selecting a framework from technical perspective.

PhoneGap Build
One more cool thing with using PhoneGap is their PhoneGap Build services, which lets you package mobile apps in the cloud. Upload your HTML, CSS & JavaScript assets to PhoneGap Build and they will compile it for you.

Summary
If you are looking to create an app with native look and feel using your existing web development skills Titanium is the right choice, but If you want to be able to “port” your app to various platforms and devices more easily, PhoneGap is the right choice. There are more than 80,000 apps developed using PhoneGap as of July 2012.

Categories: Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s