Comparison of Titanium Appacelarator 3.0.2 and Cordova 2.2

With multiple platforms and multi-vendor devices emerging in the market every other day, developing mobile applications that work seamlessly on all these platforms and devices is becoming challenge for enterprises. Creating the apps using native SDK is proving costly for enterprises both in terms of development and maintenance cost.  So enterprises are looking forward for Cross platform development frameworks with single source base and multi-platform deployments.

In this blog we will look at top 2 frameworks, Titanium Appacelarator 3.0.2 and Cordova 2.2 and compare the pros and cons of each framework.

a.   Cordova

Cordova architecture is elegantly designed to take advantage of HTML5 & UI frameworks and providing them with APIs to access the device features. It uses device Web View to render the HTML files. Its runtime engine allows the access to device features by means of common Javascript API calls. It also provides the feature to extend its runtime capabilities by means of custom plugin architecture. Using the custom plugins, developers can also create their own APIs to invoke native functionality that is not provided by Cordova.

At the runtime Cordova uses ‘Web View’ browser to render UI and execute the app. Developers have the flexibility to use standard UI frameworks like JQuery Mobile, Sencha Touch, Dojo Mobile for creating the UI. Cordova is essentially a markup driven development.

b.   Titanium Appcelerator

Appcelerator Titanium on the other hand uses JavaScript has the core development engine for building the mobile apps. Starting from building the UI to the writing process flow logic, it uses JavaScript.

Titanium comes with JavaScript Interpreter that runs directly on the device O/S. This Interpreter evaluates the JavaScript code at runtime by interpreting the code and combining it with the Titanium API (written in targeted device native language). The JavaScript calls to the Titanium API are mapped to native code in the Titanium framework and generate native components. This allows the Titanium to render the Native rich UI and invoke the device features.

Feature Comparison

The fundamental difference between Cordova and Appcelerator Titanium is that, while Cordova is a HTML5 markup based solution, Appcelerator Titanium is a pure JavaScript API that renders natively. Major differences between them are tabled below:

Cordova

Titanium

Development Framework:

Pro: Cordova uses HTML5, JavaScript and CSS3 for creating application UI and functionality

Development Framework:

Con: Titanium uses pure JavaScript & TSS for creating both UI and functionality

3rd Party Framework Integration:

Pro: Cordova allows use of UI frameworks like JQuery Mobile, Sencha Touch and Dojo Mobile

3rd Party Framework Integration:

Con: Titanium does not allow usage of 3rd party frameworks for UI development

Execution Environment:

Con: Cordova depends on device WebView component to render the HTML5 UI

Execution Environment:

Pro: Titanium Interpreter translates the javascript commands to platform specific commands and renders the Native controls

User Experience/Performance:

Con: Since Cordova uses WebView as its execution environment, UI rendering will be slow

User Experience/Performance:

Pro: Titanium provides near Native experience and performance

Platform Support:

Pro: Cordova supports iOS, Android, Windows Phone, Blackberry, Web OS, Symbian etc. by using UI frameworks

Platform Support:

Con: Titanium supports iOS and Android only

Look & Feel:

Pro: Cordova provides consistent UI across all platforms

Look & Feel:

Pro: Titanium provide native look and feel

Debugging:

Pro: Debugging Cordova application is way better than Titanium ones because they depend on the standard Webkit which can be debugged using web developer tools

Debugging:

Con: Titanium does not provide proper debugging tools/methods

Custom Plugins:

Con: Cordova plugin architecture requires separate custom plugin code to be written for each respective platform using Native language

Custom Plugins:

Pro: Single plugin code can be written using Titanium modules. Titanium will take care of generate the platform specific code for the plugin

Offline Data storage:

Pro: Cordova supports localstorage, IndexedDB, and WebSQL

Offline Data storage:

Pro: Titanium supports localstorage, SQLite embedded database

Conclusion

If you are looking to create an app using your existing team with web development skills and want to port it to various diverse platforms and devices easily, then Cordova is the one to go for.  But if your requirement is provide a rich user experience with native look and feel and platform choice is limited to Android and iPhone then Titanium is right choice.

My article on the same topic can also be read at http://www.articlesbase.com/information-technology-articles/comparison-of-cross-platform-mobile-application-development-frameworks-6796941.html