Titanium 1.0 - Native Web Apps Have Arrived
The Web Dev Zone is brought to you in partnership with Mendix. Discover how IT departments looking for ways to keep up with demand for business apps has caused a new breed of developers to surface - the Rapid Application Developer.
Your Choices as a Mobile Developer
Mobile developers have traditionally had to decide whether they want to build native apps or web apps for mobile devices. Native apps have most of the advantages in performance and seamless usability. The user experience on a web app can't leverage the relationship between the user and the device in the same way that native apps can. If mobile developers choose to build native apps, the investment is significant.
Forrester Research finds that most applications take at least three months to develop working full-time. The cost is between $20k - $150 for each application, and Schwarzhoff says that's a tame estimate. There's also the blaring fact that you are locked into one platform with its own particular SDK. Developing for multiple platforms means you have to learn multiple languages. With the mobile market moving so fast, who knows what the next major platform will be in 5-10 years?
What Titanium Does
Titanium uses a host of special APIs to blur the line between web apps and native apps. The Titanium SDK essentially allows web developers to use their skills to call Titanium APIs and build applications that run natively on desktops, mobile devices, notebooks, tablets, and set-top boxes. The Titanium Mobile toolkit supports native Android, iPhone, and iPad application development, and Titanium Desktop supports PC, Mac, and Linux development. Titanium also offers other Appcelerator technologies such as cloud services to lower development cost and speed up the app development process.
Here is a model of the Titanium architecture:
The web source files essentially map through Titanium APIs that call native functionalities such as GPS, camera, animations, and accelerometer. With such a huge array of APIs, applications developed with Titanium can natively leverage just about any feature you can imagine. Here are some examples:
- 2D/3D animations
- Geo-location, compass, and maps
- Augmented reality features
- Social app authentication and native client support for email
- SOAP or REST API calls
- Audio, video, and image capture and playback
- Taps into local filesystem and SQL lite databases
- Accesses photo gallery or address data
Titanium also makes it incredibly easy to call different native functions in your application. Here are three function call examples:
- Ti.UI.showcamera(callback) - camera access
- Ti.UI.createSound() - streaming audio
- Ti.UI.createMap() - map interface
These calls save a ton of time during mobile app development. Instead of having to write many lines of code in the native language of the OS every time you want to access streaming audio or maps, Titanium takes care of everything with a simple call. The iPhone, for example, would require around 2,000 lines of Objective-C code to access streaming audio.
Titanium 1.0 Release
Using direct API calls in place of the WebView mediation affords a 3-5x boost in performance for Titanium apps. With web-hybrid model in Titanium 0.8, applications took 10-20 seconds to launch and 1-2 seconds to transition. In 1.0, Titanium apps launch in 1-2 seconds and transitions are instantaneous.
Schwarzhoff says most of the Titanium applications that Appcelerator built were written in two weeks because of the code trimming features. Appcelerator also provides a cloud network used for testing, packaging, distribution, and analytics for your applications (similar to what Google analytics does for web pages). For the Apple App Store, you would have to jump though some hoops to certify, provision, and package your application for the market. If you use Titanium, it takes care of these steps for you.
Titanium Business Model
Schwarzhoff stresses that both editions of Titanium essentially have the same features. The Community Edition is free and it is aimed at developers who want to get a feel for the platform and possibly build free apps that gain revenue from advertising. Appcelerator is currently working on a revenue sharing model for advertisement funded apps. The free edition also has a 3 second splash screen when a user starts up the app. There's also a Professional Edition (no splash screen) that is $199 per developer per year. It includes a direct line of support from Appcelerator along with cloud analytics for your applications and early access to upcoming platform support for BlackBerry and the iPad.
Appcelerator is launching a Developer Center to help Titanium users get started and provide training. Appcelerator also provides several free and open source applications to help developers get started with Titanium 1.0:
- KitchenSink is the unit testing for every API that Titanium provides.
- SnapPost is a basic image viewing app to see how Titanium applications work.
All versions of Titanium are licensed under the Apache License v2.