Developing mobile apps with Appcelerator Titanium
Recently we have been working with the development of a really exciting mobile app for one of the BootstrapLabs portfolio companies.
It is a mobile social service in the social discovery space, it’s about discovery of people and places and what to do.
As the client is targeting multiple mobile platforms with their service we looked at a few different options, from doing native development in Objective-C (for iOS) and Java (for Android) or going with a HTML5 based approach, such as Phonegap.
We have a strong preference for the native user experience, and the client was very clear that a native experience is important as they are targeting to be a natural utility for their users on a daily basis. At the same time speed to market, and an agile development cycle was a crucial requirement.
We ended up in the middle, and with a choice of using Appcelerator Titanium as the development platform for this project. Appcelerator provides a environment where you can develop a common code base that can be built for both iOS and Android devices.
Building mobile apps in Javascript
For many this might be very attractive. Our development team is very experienced with Java, and more structured languages, and to us Javascript actually is a bit of a setback in productivity, and a step away (mostly in the effect of not being able to as quickly create solid, tested and reusable components) from the more rigid control of types and usage you get in a language like Java (now Objective-C is somewhere in between).
The good
The great thing with Appcelerator, that even our non-Javascript developers got really up to speed quickly to flesh out the basic structure of the app.
Look at this short code snippet it creates a window with a tab group, and adds a sub window/view to that.
var window = Titanium.UI.currentWindow;
// create tab group
var tabGroup = Titanium.UI.createTabGroup({});
tabGroup.addTab(
Titanium.UI.createTab( {
icon: Titanium.Filesystem.resourcesDirectory + '/images/icons/11-clock.png',
title: 'Dashboard',
window: Titanium.UI.createWindow( {
url: 'taskDashboardWindow.js',
title: 'MyTasks',
barColor: '#000000'
} )
} )
);
window.add( tabGroup );
tabGroup.open();
The bad
The Titanium Appcelerator product is a not yet very mature. It holds great promise in terms of developer productivity, and after their purchase of Aptana, they have a really great Eclipse based development environment (although we would prefer Eclipse plugins, so we could use the Eclipse environment we use for everything else together with Appcelerator). The Aptana based version now called Titanium Studio offers step-by-step debugging, and a lot of powerful features to aid through the development cycle.
The ugly
The way Appcelerator compiles Javascript code down to native code does not always translate well, and there are a million of quirks to avoid, to get your app to work well and be stable. Once our app grew big enough, we started to see all kinds of instability issues. Mainly related to any communication of JSON HTTP requests. But it is hard and unpredictable to diagnose.
Summary
Consider Appcelerator and Titanium Studio for your next mobile development project, but it is not the short-cut or rapid development path we were hoping it would be. It has a lot of benefits. We will continue to use Appcelerator, but we are looking at both 100% native and web based wrapper approaches for a number of the applications we are developing going forward.
| Print article | This entry was posted by Nicolai Wadstrom on August 18, 2011 at 11:35 am, and is filed under iphone, mobile, Uncategorized. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
