Titanium Mobile vs Sencha Touch

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:

9 thoughts on “Titanium Mobile vs Sencha Touch

  1. James Hughes

    There is also the option of using PhoneGap to embed the Sencha framework and application code into a native wrapper so no need to download anything from the server. Still not technically native though.

    Reply
  2. Pingback: Prog.Hu

    1. admin Post author

      Rhodes seems to be more similar to Phone gap. It would be the framework of choice for developers who are good at Ruby. And all the code goes through the embedded ruby interpreter might cause some performance issues during runtime. In this regard , Titanium has an edge over Rhodes in this regards as native source code is generated and no interpreter runs after compilation.

      Also Rhodes supports MVC where the Model resides on the Rhodes servers provided sync capabilites free and right out of the box without much of code required. Hence a good choice for developers who want to support data on the cloud with well structured data pushing.

      In total, Rhodes a good choice if you like Ruby and want their data on the cloud service and if you dont care about runtime performance (smooth animations)

      Reply
  3. Juan Mendes

    I have been developing a mobile app using Sencha. However, we do need some of the native functionality, mostly just the phone UID, plus the ability to install from the app store. I then used phone gap to build an app but i was bit by a number of bugs, slower startup, my tabs were shrunk and didn’t fit the icon and text… (only when running from phone gap). I am now considering switching to Titanium altogether (ditching Sencha), or going the phone gap route and using the webview in Titanium along with my sencha code. Thanks for the analysis

    Reply
  4. Tony Lukasavage

    “phonegap vs sencha” is a misleading title as the two are often used in concert to create mobile apps. Sencha, as you stated, supports webkit based browsers, which means as a mobile framework it will not support Blackberry before 6.0, webOS, or Symbian. Be sure you are willing to sacrifice this compatibility before using it.

    You may be interested in a more in depth look I took at phonegap and appcelerator: http://savagelook.com/blog/portfolio/a-deeper-look-at-appcelerator-and-phonegap

    Reply
    1. admin Post author

      I have mentioned that it is possible to embed sencha inside titanium app using a webview and the title here refers to the independent implementations , ie. a pure sencha web app vs a pure titanium native app made using native UI components.

      BTW, your analysis of different frameworks on your blog is simply awesome. Great work out there. Keep it up.

      Reply

Leave a Reply to call of duty ghost prestige hack Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>