Book Image

Appcelerator Titanium Smartphone App Development Cookbook Second Edition

Book Image

Appcelerator Titanium Smartphone App Development Cookbook Second Edition

Overview of this book

This book will take you through the process of building cross-platform, native UI applications for the mobile from scratch. You will learn how to develop apps, how to use GPS, cameras and photos and how to build socially connected apps. You will also learn how to package them for submission to the App Store and Google Play. This cookbook takes a pragmatic approach to creating applications in JavaScript from putting together basic UIs, to handling events and implementation of third party services such as Twitter, Facebook and Push notifications. The book shows you how to integrate datasources and server APIs, and how to use local databases. The topics covered will guide you to use Appcelerator Studio tools for all the mobile features such as Geolocation, Accelerometer, animation and more. You’ll also learn about Alloy, the Appcelerator MVC framework for rapid app development, and how to transfer data between applications using URLSchemes, enabling other developers to access and launch specific parts of your app. Finally, you will learn how to register developer accounts and publish your very own applications on the App Store and Google Play.
Table of Contents (21 chapters)
Appcelerator Titanium Smartphone App Development Cookbook Second Edition
About the Author
About the Reviewers


The ability to create user-friendly layouts with rich, intuitive controls is an important factor in successful app designs. With mobile apps and their minimal screen real estate, this becomes even more important. Titanium leverages a huge amount quantity of native controls found in both the iOS and Android platforms, allowing a developer to create apps just as rich in functionality as those created by native language developers.

How does this compare to the mobile Web? When it comes to HTML/CSS-only mobile apps, savvy users can definitely tell the difference between them and a platform such as Titanium, which allows you to use platform-specific conventions and access your iOS or Android device's latest and greatest features. An application written in Titanium feels and operates like a native app, because all the UI components are essentially native. This means crisp, responsive UI components utilizing the full capabilities and power of your device.

Most other books at this point would start off by explaining the fundamental principles of Titanium and, maybe, give you a rundown of the architecture and expand on the required syntax.


We're not going to do that, but if you want to find out more about the differences between Titanium and PhoneGap, check out

Instead, we'll be jumping straight into the fun stuff: building our user interface and making a real-world app! In this chapter, you'll learn all of this:

  • How to build an app using windows and views, and understanding the differences between the two

  • Putting together a UI using all the common components, including TextFields, labels, and switches

  • Just how similar the Titanium components' properties are to CSS when it comes to formatting your UI

You can pick and choose techniques, concepts, and code from any recipe in this chapter to add to your own applications or, if you prefer, you can follow each recipe from beginning to end to put together a real-world app that calculates loan repayments, which we'll call LoanCalc from here on.

The complete source code for this chapter can be found in the /Chapter 1/LoanCalc folder.