Titanium - native mobile apps with JavaScript
Posted by shapeshed on 28th January 2011
At pebble.it the development team have been working hard to get up to speed with iOS so that we can support our clients’ growing requirements for mobile applications.
The team have reached a good level of understanding on iOS even diving into OpenGL to create a complex drawing application.
With most of the team coming from a web background we’ve been keeping a close eye on frameworks like Phonegap and Titanium.
Inspired by the wonderful wunderlist, which is built on Titanium, we had a closer look at Titanium.
One API to rule them all
One issue we’ve discussed as a team is the fact that in developing mobile apps there are multiple SDKs and frameworks to master. Just as soon as you’ve got to grips with Objective-C and the iPhone SDK there’s Android and Blackberry. To date our philosophy has been let’s get really good at iOS. We are still following that but Titanium allows us to support other platforms, at least on a superficial level.
Here’s some code from the default scaffolding app. If you are familiar with JavaScript it should read easily to you.
//
// create base UI tab and root window
//
var win1 = Titanium.UI.createWindow({
title:'Window 1',
backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({
icon:'KS_nav_views.png',
title:'Foo!',
window:win1
});
var label1 = Titanium.UI.createLabel({
color:'#999',
text:'I am window 1',
font:{fontSize:20,fontFamily:'Helvetica Neue'},
textAlign:'center',
width:'auto'
});
This is the code behind creating a tabbed window with a label for both iOS and Android:

For more checkout the API documentation and Code Examples.
Strengths
Titanium has surprisingly good coverage of the APIs for iOS and Android. Installing the KitchenSink application on a device shows just what you can do with it.
It is quickly apparent that it would be possible to scaffold an application for both Android and iOS in no time.
The fact that Titanium creates native applications using just JavaScript is a huge draw.
Weaknesses
Installation didn’t go smoothly, leading me to the forums where I found lots of other developers who were having problems getting Titanium off the ground. I followed the advice of a couple of posts, fixing a bug in the Python source, and had to fiddle around with a number of things on Android to get it working.
Documentation and walkthroughs are a little light and I ended up learning from the source. Some might argue that this is the best way to learn anyway but it would be great to have some more code examples in the API documentation. Given that this is an Open Source project if we use Titanium I’d certainly be willing to fork the project and improve documentation. There are also paid for videos available.
Issues like memory management and how Titanium performs across different versions of SDKs are not really understood at the moment.
Conclusion
Titanium looks like a really interesting project for our business. Given that we can also use it to write cross-platform desktop applications it actually opens up new markets for us. It leverages existing skill sets within the team and will allow us to get apps off the ground more quickly. For more complex client requirements though we will need to drop down to writing custom code - a common scenario with frameworks.
Tags:
Apple TV Evolution
Posted by elpabl0 on 23rd August 2010
Way back in September 2006 Apple announced their innovative Apple TV device, which brought the iTunes-powered media experience to your HDTV. Since then, it’s seen a small amount of success, and a couple of spec bumps, but was never really the game-changer it could have been.

Recent speculation suggests that the device is getting a rethink and relaunch - perhaps even as soon as this September, as suggested by Digg Founder, Kevin Rose.
Changing Trends
The evolution of our television consumption is a hot topic right now - almost all UK households are now endowed with Digital Freeview, Virgin Cable or Sky, and there’s a rise in the number of Freeview HD boxes available on the market. More significant is the increase in users of the ‘on-demand’ internet services provided by the channel operators. Research figures suggest as much as 78% of viewers in the UK are now using on-demand services, such as 4oD and BBC iPlayer. This is only going to increase as more devices capable of streaming these services hit the market.
Apps
Given the success of the iPhone, iPad and the App Store, it would seem certain that a new iOS-based device could make waves by bringing Apps to our living room screens. Forget the web - it’s unlikely that we’re going to be sitting on our sofas with a full keyboard. The key is in simplicity: making online services, such as weather, news and media content accessible with a simple remote. It’s fair to assume that existing on-demand services, such as iPlayer, would be immediately available alongside apps from other media outlets. The PS3 has been leading the way with this so far, but Sony’s integration of new services has been slow.

Not forgetting, content providers will also have a fantastic potential revenue stream built into iOS - either by charging for their applications in the App store, or via Apple’s emerging iAds service.
Google’s Approach
It’s certainly not an unexplored space though - Google announced ‘Google TV’ back in May this year - but their focus is on the software, which will run on many devices from multiple manufacturers, such as upcoming Bravia TVs and blu-ray players from Sony. That approach has worked for Android, so there’s a fair chance they’ll see success in this arena too - they’ve also got the jump on Apple, with Google TV devices likely to be in the hands of consumers towards the end of this year.
Speculation
Early indications suggest the new Apple TV (or ‘iTV’) would be launched this year, and at a price point of $99 - that seems a bit low for Apple: there’d be concern that hardware at that price would be underpowered. Nevertheless, if they’re hoping to make a large impact then market saturation through hardware subsidisation would be one way to go. They’d certainly recoup via iTunes and App Store purchases.
We’ll have to wait and see what Apple announces, and how well Google’s platform is adopted, but we can brace ourselves for the next stage in the ongoing platform battle between these two innovators.
Tags: