« Sell or Donate? | Main | 10 Facts About Smart College Visit »

JavaScript Is a Plain-Belly Sneetch

Posted by Handshake 2.0 at 9:00 AM on December 28, 2011:

From Wil Collins:

To use the mobile application development tool Titanium Appcelerator requires knowledge of JavaScript.

Expanding upon this Dr. Seuss analogy that Titanium Appcelerator works for mobile apps like McBean's machine works for Sneetches, if mobile apps are thought of as the Star-Belly Sneetches, then the JavaScript code can be understood to be a Plain-Belly Sneetch. Placed into McBean's Machine, a.k.a. Titanium Appcelerator, a single "plain" app written in JavaScript is transformed into two "star" apps written in Objective-C (iOS) and Java (Android).

Despite their similar names, JavaScript is not to be confused with the Java programming language. However, it is helpful to think of JavaScript as an object-oriented language, just like Java. "Thinking object-oriented" allows for the encapsulation of data within objects as well as functions and methods to interact with individual objects.

JavaScript
"Thinking object-oriented" also allows for easier management of the various aspects of graphical user interfaces (GUIs), including those within mobile apps. Buttons, tabs, text fields and windows all have different purposes and perform separate tasks and, therefore, can be thought of as separate objects. Being part of a GUI, they are all designed to be interacted with and the use of various methods and functions makes this interaction possible.

Titanium Appcelerator’s modular approach to the design process makes the development of apps with their software much more object-oriented.  It provides users with numerous application programming interfaces (APIs) that contain many of the common components for GUI implementation, both desktop and mobile. These APIs enable the metaphorical Dr. Seuss magic to occur when developing mobile apps. They transform the JavaScript written by the programmers into separate code for the two operating systems, or should I say they transform the Plain-Belly Sneetches into those with “stars upon thars.”

Wil Collins is a computer science major at Virginia Tech and an intern with Handshake Media, Incorporated, makers of Handshake(R) mobile applications.

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

As far as alternatives, we have been utilizing PhoneGap (http://phonegap.com/) and Sencha Touch (http://www.sencha.com/products/touch) at Zer0day. Great article!

Thanks so much for the comment, Wade! You've been such a help to Handshake Media from its beginning!

We've chosen to work with Titanium Appcelerator for several reasons.

Foremost is that more developers were using it than other platforms when we made our selection:
http://www.readwriteweb.com/mobile/2010/12/30-plus-tools-for-building-your-own-mobile-app.php

And news of the $15 million supports our choice:
http://techcrunch.com/2011/11/01/appcelerator-raises-15-million-series-c-round/

Surely it's not the right solution for all problems. PhoneGap may well be a tool of choice. This comparison might prove of interest:
http://savagelook.com/blog/portfolio/phonegap-is-web-based-appcelerator-is-pure-javascript

Again, Wade, thank you so much for the conversation!

Awesome information - I had never heard of Titanium before and plan to look more into it now. Thanks for the kind words!

The question on my mind with this type of thing is "This sounds great, why doesn't everyone use this?" Obviously, there have to be some drawbacks. Coding a native iOS in Objective-C is a much different beast than coding a native android app in Java.

Alas, there are limits, and this is important for people to understand. I found this article which outlines some of the basic caveats: http://usingimho.wordpress.com/2011/06/14/why-you-should-stay-away-from-appcelerators-titanium/

As with any software project, the tool you choose for implementation must fit the job for business reasons, performance constraints, and quality goals.

That article is over 6 months old and those "basic caveats" are memory management issues that stem from a misunderstanding of the platform, not a limitation.

For reference, here's a terrific video detailing how you can profile your Titanium apps, squashing any memory leaks you may encounter.

http://vimeopro.com/appcelerator/codestrong-2011/video/29804284

Prior to working with Handshake Media, I joined a Virginia Tech research project to work on their Bus Tracker app. We were faced with the dilemma of choosing a platform that fit our development needs without limiting our abilities. In the end, we chose to use Titanium Appcelerator because of its ability to create truly native apps for iOS and Android. Being truly native results in much faster performance and an application that is only limited by the device it is installed upon.

Also, the memory management issues that arise are, as Tony stated, "a misunderstanding of the platform, not a limitation." Due to this, Appcelerator continues to release updates that address such problems as they are identified.

There is a lot of noise about platforms and old references to blog posts, at the end of the day it comes down to creating business value in the most efficient manner.

If you are looking for the best cross-platform solution for building native applications with native UX then Appcelerator is the only choice. Large corporations have made that decision and I am pretty certain they did a little more due diligence then some of the blog posts out there. See video tony references above.

I have had this discussion so many times is have summarized my thoughts here

http://blog.clearlyinnovative.com/post/14932241825/why-i-chose-titanium-appcelerator

Thanks so much, Aaron! When we're asked, "Why Appcelerator?" we'll just send the link to your presentation.

Thank you so much for adding to this conversation!

With appreciation,
Anne

When working on some of our apps we ran into memory leaks, unexpected behavior, crashes and so on, but none of that proved insurmountable. Every platform will surely bill itself as miraculously easy and simple, and a simple demo app or two will indeed come out that way. But like all platforms, Titanium has right and wrong ways to do things, and the wrong ways give results that seem inexplicable until you find out what you're doing wrong.

Actually, the thing I've found most frustrating when working with Titanium is that an app that works perfectly on one Android version falls apart on another. But again, nothing insurmountable.

The comments to this entry are closed.