I just  tried out the sencha touch examples  on the android 1.6 simulator and the performance is pathetic. Seems like google forgot to properly implement their javascript V8 engine onto their OS.

Appcelerator’s Titanium Mobile and Sencha touch are 2 different frameworks which address a totally different set of audiences. Comparing them is like comparing apples to oranges. But, to a person who has never eaten fruits ever and wants to just try tasting one (analogy to creating a simple app which doesnt do much of processing) and not try juggling with the fruits (analogy to creating detailed games or apps with lot of processing involved), they appear the same. So here’s a post attempting to compare them and help out those who have to make a choice when it comes to building a  simple app.

Titanium Mobile Kitchensink app running in iPhone simulator

Sencha touch examples app running in iPhone simulator


Here’s where Titanium Mobile wins :

  1. Titanium is open source and free. Sencha touch follows dual licensing model like extJS, i.e. it is open source, but if you use it for commercial purpose, you need to buy their license.
  2. Titanium builds native apps. So you have access to almost every feature in the phone, like say reading phone contacts, accessing accelerometer, GPS etc. Sencha will work inside the phone browser .  ALthough it can be made to work as a pseudo-app by embedding it inside a webview of an app made using Titanium/Cocoa. I suppose it can access GPS coordinates to some extent with the users authorization, but I am not sure about it. Also Titanium will support (in near future) running the app in the background and PUSH notifications which cannot be done using Sencha as it runs inside the browser.
  3. When an app made using sencha loads , it has to load the framework first and then the content. So it will be a little slower in terms of loading time compared to Titanium built apps as it has to download the 300 KB sencha framework and the images for the buttons. Although the download process can be bypassed (Thanks to James Hughes for pointing it out) by including the framework in the Phonegap or Titanium resources folder, the javascript parsing time taken by the webview might become noticeable at the user’s end. On the iPhone simulator, it takes around 2-3 seconds for the sencha’s simple Nested list example to parse and display even when the Sencha framework is store along with the app.

Sencha touch runs in the any simulator, be in iPhone, android or blackberry. You do not need any kind of separate sencha touch simulator as such. Hence Sencha touch has its own set of advantages, namely :

  1. Sencha gives more control in making changes to your UI after the app is published. Since all the code is getting loaded fresh from the server each time the user accesses, you can virtually modify the entire app without the user’s knowledge. But when it comes to a native app built using Titanium,  the changes have to go through apple’s review process and the user must manually update the app. In short Sencha requires a lesser turnaround time when it comes to bugs/updates.
  2. Sencha works on almost all webkit based browsers which includes chrome, safari and opera. So you can be sure that it displays the same UI in iPhone,Android,Blackberry,iPad and also desktop browsers. So once IE and firefox fully supports HTML5, then you can have a single code which will work on all desktop browsers and all mobile devices uniformly. Titanium apps make use of native controls. So it gives a different UI on different devices and are currently limited to iPhone,iPad and Android devices (Blackberry devices soon)

Although both the frameworks use simple Javascript syntax , the choice of the framework will depend on the project under consideration. If the app just makes HTTP requests to some servers to fetch the results, then sencha touch should be good enough. But if there are plans of improving the app later on to make full use of the phones features like running the app in the background , accessing GPS data continuously , sending PUSH notifications, stream music & videos, write to Files & Databases etc then Titanium should be used. But a perfect mashup between them is what developers look out for.

Titanium too does not come without limitations. After playing around with titanium sdk 1.4 , I have realized that the guys over at appcelerator care more about the iPhone than android. Titanium android sdk does not support many of the functions provided in iPhone. Some of the most common ones are : Phone contacts, Animations, Horizontal Layout etc. Also the nature of android platforms limits the framework from providing some functions like WIndow transitions, webview for reading pdf,doc etc. I will keep adding more revelations about Titanium as I come across them. Cya later.

Incoming search terms: