Introduction
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.
Yawn...!
We're not going to do that, but if you want to find out more about the differences between Titanium and PhoneGap, check out http://www.appcelerator.com/blog/2012/05/comparing-titanium-and-phonegap/.
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.