I've read so many articles (which I listed below), but I can't get a consistent answer. We would it be possible to just pick one of the following 2 answers? If you work for Appcelerator or any competitor, please state so. Thanks!
FYI, I am working with Titanium Studio 1.7.2.
A) Yes it compiles to native code, but some of the code must be left in Javascript and interpreted at runtime.
B) No, that is not the way Titanium works.
Here are the articles, I have read:
1) Comparison between Corona, Phonegap, Titanium
2) http://developer.appcelerator.com/blog/2010/12/titanium-guides-project-js-environment.html
3) What happens to JavaScript code after app is compiled using Titanium Mobile
4) How Does Appcelerator Titanium Mobile Work?
Kevin Whinnery's response is accurate on the link you provided to "What happens to JavaScript code--".
To state it succinctly: your JavaScript runs in a runtime (JavaScriptCore on iOS, and Rhino but soon V8 on Android). Your JavaScript can interact over a bridge with native code and components. Like buttons, table views, web views, labels, etc. The actual JavaScript is compiled in to the app and run at runtime on the device. But this is a very simplistic answer. To learn more, please read Kevin's answer in the link above.
That's how you get the power of JavaScript with the power of the native components on both platforms.
I work for Appcelerator.
From what it seems (what they publish on their website and promos at least) , they have a Javascript API thats being compiled into Native bits on iPhone or Android (Objective C and Java accordingly, depending on the OS)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With