JSFoo 2012

It’s like kung fu with JavaScript and objects! All about building full size apps in JavaScript.

Ravindra

@ravidsrk

Cross platform native apps using ONLY "Javascript" using Titanium

Submitted Aug 1, 2012

  • How Does Appcelerator Titanium Mobile Work?
  • When to use Hybrid solution to create Mobile apps?
  • Myths about Mobile Apps?
  • What you should forgot to Work with Titanium?

Outline

Titanium takes your Javascript code, analyses and preprocesses it and then pre-compiles it into a set of symbols that are resolved based on your applications uses of Titanium APIs. From this symbol hierarchy we can build a symbol dependency matrix that maps to the underlying Titanium library symbols to understand which APIs (and related dependencies, frameworks, etc) specifically your app needs. I’m using the word symbol in a semi-generic way since it’s a little different based on the language. In iPhone, the symbol maps to a true C symbol that ultimately maps to a compiled .o file that has been compiled for ARM/i386 architectures. For Java, well, it’s more or less a .class file, etc. Once the front end can understand your dependency matrix, we then invoke the SDK compiler (i.e. GCC for iPhone, Java for Android) to then compile your application into the final native binary.

So, a simple way to think about it is that your JS code is compiled almost one to one into the representative symbols in nativeland. There’s still an interpreter running in interpreted mode otherwise things like dynamic code wouldn’t work. However, its much faster, much more compact and it’s about as close to pure native mapping as you can get.

Speaker bio

I am front end engineer from Cleartrip. Currently working on mobile apps for cleartrip. My previous experience was with creating hybrid mobile apps. Have worked on more than 20 hybrid apps.

Comments

{{ gettext('Login to leave a comment') }}

{{ gettext('Post a comment…') }}
{{ gettext('New comment') }}
{{ formTitle }}

{{ errorMsg }}

{{ gettext('No comments posted yet') }}

Hosted by

JSFoo is a forum for discussing UI engineering; fullstack development; web applications engineering, performance, security and design; accessibility; and latest developments in #JavaScript. Follow JSFoo on Twitter more