Rhnio And V8

2013/11/25 09:24
阅读数 309

V8 is a C-based JavaScript interpreter developed primarily by Google. It is the JavaScript engine used by the likes of Chrome and node.js, as well as Titanium Mobile for Android. In Android platform versions 2.2 and higher, V8 can be used as a JavaScript engine for Titanium by using Android's NDK (which enables developers to write their own C code for Android). This is the default JavaScript interpreter used by Titanium on Android.

Rhino is a Java-based JavaScript interpreter developed by Mozilla and contributed to by many. Because it is Java-based, Rhino can be used in any Android environment. Not all Android devices support the NDK (despite being Android 2.2 or better), notably Google TV. In general, V8 is preferred to Rhino because the performance of V8 is significantly better in most scenarios.

The "Android Runtime" might be considered the combination of:

  • A JavaScript engine (Rhino or V8)
  • Titanium's native C code, which provides the binding layer between the JavaScript environment in which your source code is evaluated
  • Titanium's Java code, which implements most of the Android APIs for UI, data access, and other platform features
展开阅读全文
加载中
点击引领话题📣 发布并加入讨论🔥
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部