August 18, 2013

Getting started with Appcelerator Titanium - Become a mobile dev in a weekend

I've always wanted to get into mobile development and I played with phonegap a little bit, but was pretty disappointed in the bad performance and the fact that apps built in phonegap just don't "feel" native. Because phonegap is really just HTML and javascript running in a webview on your phone, that's to be expected though.

I had heard good things about Appcelerator Titanium. Its promise is to perform better and feel native - well, actually it IS native as it compiles into a native app as opposed to phonegap which basically just bundles all js and HTML files into an apk (for android) and executes that code inside of a web view. - No knock on phonegap; it's great depending on your needs.

I was very impressed with the quality of documentation for Titanium. There's a great API reference, an active community, tons of videos and even an eBook.

I used the following approach to get started:

The one problem I had was finding a good best practices document on layout. I mostly want to develop for Android and given that Android has such a huge variety of devices with different resolutions and pixel densities, this struck me as pretty important. I still haven't found a good resource on this, so if anyone could point me in the right direction, that would be great. As of now, I use only dp (device-independent pixels) with some %-positioning/sizing mixed in. This gave me pretty good results on a variety of devices.

Comments powered by Disqus