How do cross-platform mobile app development frameworks work?
Asked Answered
M

4

12

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?

Manlove answered 27/12, 2010 at 5:10 Comment(2)
Javascript is probably native to many mobile plattforms while Ruby or C or Python would have to be converted either on a high level or on a binary code level to the dominant language of the target system (Obj-C, Java, ..). It might also be interpreted in some way. I wouldn't wonder if via Jython you could run Python on Android for example. C itself can probably be compiled in a native way to the hardware plattforms used but I don't know much about the communication with Android/iOS then.Lesleylesli
You can execute Python on Android through Termux. Howto: wiki.termux.com/wiki/Python [This is not how the cross platform tools produce portable apps.]Gasometer
R
3

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.

Rubber answered 28/12, 2010 at 12:0 Comment(2)
Rhodes uses a local server, meaning a tiny Ruby server local to the mobile device?Manlove
Appcelerator doesn't use the device browser (unless you specifically want to), it uses native controls.Hyperbolize
E
4

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

Ehr answered 8/1, 2011 at 14:45 Comment(0)
R
3

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.

Rubber answered 28/12, 2010 at 12:0 Comment(2)
Rhodes uses a local server, meaning a tiny Ruby server local to the mobile device?Manlove
Appcelerator doesn't use the device browser (unless you specifically want to), it uses native controls.Hyperbolize
F
2

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.

Fuse answered 27/12, 2010 at 6:27 Comment(1)
Very interesting. Do you know how Rhodes can go from HTML + ERB to webkit Javascript to Obj-C binaries?Manlove
T
1

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.

Tribune answered 28/12, 2012 at 15:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.