Wednesday, March 7, 2012

Choosing a mobile framework: Investigating Appcelerator Titanium

This is a follow-up for Choosing mobile dev platform/framework and looks closer at the ninth step -  Investigating each framework. Here we look at Appcelerator Titanium. I'll go through each of the steps from the common post for all the frameworks.

Is it easy to get started?
Installing Titanium Studio is very simple, and if you know how to write javascript, you should be able to create a project and be up and running within minutes after installing.

Is it easy to extend the library?
You can write modules, which is fairly simple. There are thorough guides on how to do it here: (

Features I need for my project
Drag and Drop
There are several discussions on their forum (here), but nothing is native. Since it's javascript you can usually try the usual suspects (jquery drag and drop, sencha etc) to see how they perform. I found drag and drop performance to be way below par on slower android devices, as well as on iPhone 3GS.

Text to Speech
You have to write and extension, which is quite simple.

Basic image manipulation
There is some manipulation options through the image view, however, you cannot modify the image source, only how you view it. If that is what you want, you are all set. (Read about it here: Titanium.UI.ImageView)

Basic access to camera
Yes, through the Media module. Would probably be better if it was in a separate module, as I see the connection between media and Camera, but I also feel they should be separate.

You can use a webview with a canvas, or write it in javascript. See this example for how to write an animation: ( Or there is the paint module found here: I found this module quite easy to use, and it seems updated quite frequently. I think Drag and Drop might be better to implement through the paint module, as it will probably give better performance than using UI widgets in a view.

JSON support
Supported in the framework (Titanium.JSON)

HTTP(S)-request support
Supported in the framework (Titanium.Network)

Custom user interface placement and user interface elements
Yes, either through extending a UI widget, using a webview, or just paiting directly. You probably have to extend on per-platform basis, depending on how you implement it.

Audio playback (simple)
Through the Titanium.Media.Sound object. It's limited by formats supported by the platform as well as the number of channels supported by the platform.

Deployment to supported platforms
This is one of the great things about Titanium. If your code isn't too complicated and isn't using too many 1-platform-only calls, you should be able to load up your project from either a mac or a PC and recompile/process for the platform you need to. It's then a matter of following simple guides on how to sign your app and submitting to each of the respective markets.

It's free to get started, however you will probably end up looking at their $49 per month indie pricing, as you are given access to some modules that might come in handy. Paypal module, urban airship, brightcove (to mention a few.

Direct access to APIs
Through writing modules/javascript wrappers. You should be able to use most native apis that way, but some might be harder to implement than others.

Programming Language
JavaScript and/or CSS/HTML5 for hybrid apps. Javascript for pure native apps. For desktop development, ruby, php and python is also supported. Although if you are creating an app for both desktop and mobile, you are stuck with JavaScript.

This is one of the strong points for Titanium. The documentation is really good, well sorted, easy to navigate, and if you need more information there is always the forums. However, people seem to be a bit reluctant on helping each other out compared to other frameworks. That might be because the platform is still quite new, and needs to establish a "core" developer fanbase.

Supported platforms
  • iOS
  • Android 
  • Bada (beta)
  • Windows (Through their desktop SDK)
  • OS X (Through their desktop SDK)
I only wish Windows Phone 7 was on that list, but that probably comes when MS accepts using native code on Windows Phone 7.

Other features
Marketplace: (
Quite a few modules on github: ( and there are plenty more if you search for appcelerator modules)

All inn all a really well documented and supported framework. If I was going to write a business app, I would probably choose it, but for a project that is partially game/app, it's not suited. Their target audience is information and media rich applications. E.g. apps connecting to facebook, twitter, flickr, or another web service, and giving you information, or letting you interact with it. If you are looking into apps that are somewhere between a game and application, you can use the framework, there is just other options for you that are better out there.