Getting started with Appcelerator Titanium - Become a mobile dev in a weekend
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:
- Work through the installation-walkthrough up to the point where you can build a hello-world app. Install the kitchen sink app and run it to get an idea of all the controls and features that are available.
- I then worked through the eBook from start to finish, and I highly recommend it. It's a great intro to Titanium and mobile development in general. It also lists some best practices and pitfalls.
- Install the community app and look at the app.js, bootstrap.js etc. Try to understand how the app is bootstrapped and how the different modules are pulled in.
- Start building your app :)
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.