听AppceleratorCEO谈Titanium如何架构
在stackoverflow上有人问到Titanium Mobile是如何运行的,AppceleratorCEO Jeff Haynie 给出了他的回答,这里给大家转过来看看!
How Does Appcelerator Titanium Mobile Work?
Question:
In "Distribution" (production) mode, when you're ready to ship the app, we compile the JS to Java bytecode using the Rhino JSC compiler. You can also enable this during development mode by setting "ti.android.compilejs" to "true" in tiapp.xml, see: http://developer.appcelerator.com/question/100201/enable-android-byte-code-compile
dex, aapt, and other Android SDK tools are used to build and generate the final APK
adb and keytool are used for pushing the APK out to the emulator and/or device
There are many more details that I could dive into specifically on each of these points, but the point I wanted to drive home is that we no longer use the WebView as our Javascript engine. You can however still embed WebViews, and we provide some simple integration that allows you to call Titanium APIs from an embedded WebView.
-Kevin Dev Relations Manager