Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Appcelerator architecture

I've been trying to find out some more about the underlying architecture however i can't find any suitable resources!

What i want to know is how abstract is the titanium API compared to the iphone one. How direct is the mapping between the two. So we have the concept of an ImageView and animations here, but do they map to some native APIs?

And what happens to the code when it's built? I've seen a tweet about the possibility of generating an xcode project - so this implies that the javascript is cross compiled into objective-c… is that the case?

I'm really trying to understand the best way to approach projects and also understand the best way to get performance out of it.

Any pointers to white papers, docs or answers would be very useful.

Kindest regards

— asked May 11th 2010 by Paul Curtis

1 Answer

  • Hi Paul,

    As you know, your project's source code is written in JavaScript, which is packaged with your application binary. Your JavaScript code is then interpreted on the device by WebKit's JavaScript interpreter, which we have instrumented with hooks to native APIs. So to specifically answer one of your questions, your app is not cross-compiled to Objective-C. For iPhone (as of 1.3.0), we will be generating an Xcode project for your Titanium app, but it won't be necessary to use it unless you have a specific need to use Xcode. You can do everything you need to do using Titanium Developer and the build scripts Developer uses to deploy your app to a simulator or to a device for testing.

    The visual Titanium JavaScript APIs are heavily influenced by and modeled after the iPhone SDK. The non-visual APIs are pretty much agnostic. None of them map directly to the native APIs, however.

    A good overview of the platform can be found in the screencasts I've done for our introductory training - here's the first in the series.

    — answered May 11th 2010 by Kevin Whinnery
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.