How do cross-platform mobile app development frameworks work?

旧街凉风 提交于 2019-12-05 14:58:50

问题


How are Rhodes, Phonegap, and Appcelerator able to take Javascript or Ruby, and compile them into binaries for app SDKs that normally require apps to be written in Obj-C, Java, and others?


回答1:


Phonegap uses the default browser rendering engine, and uses that to display your application. The javascript is then handled by the native (compiled) part of the framework.

Appcelerator uses something simular, but compiles the whole application if i remember correctly.

MoSync uses a somewhat simular setup as javaME.

Rhodes uses local server. It uses this to communicate with the device.




回答2:


Jeff Haynie, Appcelerator co-founder, explains how Titanium Mobile works here.




回答3:


A Javascript interpreter is built into the webkit browser engine, and the iPhone/iOS SDK gives enough access to this interpreter to run nearly an entire app written in Javascript, with just a tiny Objective C wrapper to start things up.

Android supports native ARM machine code though the NDK, so nearly any language with a compiler that can create a stand-alone ARM binary (but requiring little to no OS access) can be used as a library and accessed via the NDK interface from a Java app stub.




回答4:


I've created an open source project http://propertycross.com that helps select a cross-platform mobile framework by showing the same application implemented with Sencha, Titanium, Xamarin and more. The project also includes details of how each framework works. It should help you compare end-user experience, code, developer experience and code shared between the various options.



来源:https://stackoverflow.com/questions/4536717/how-do-cross-platform-mobile-app-development-frameworks-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!