Mobile Development 12 min read

Analysis of Cross‑Platform Mobile Development Approaches

The article reviews recent cross‑platform mobile development techniques—including Web‑based hybrid, code‑conversion, compilation, and virtual‑machine streams—examining their performance, functionality limitations, and practical tools such as j2objc, MyAppConverter, Sharpen, Haxe, and XMLVM.

Qunar Tech Salon
Qunar Tech Salon
Qunar Tech Salon
Analysis of Cross‑Platform Mobile Development Approaches

React Native has revived interest in cross‑platform mobile development, prompting a discussion of why earlier Web‑based solutions often fell short due to performance or missing native APIs, and why developers still seek a "write once, run everywhere" approach.

The author categorises existing solutions into four major streams:

Web (Hybrid) stream – uses Web technologies inside a WebView or embedded Chrome engine.

Code‑conversion stream – translates source code from one language to another (e.g., Java to Objective‑C).

Compilation stream – compiles source code to native binaries for each platform.

Virtual‑machine stream – ports a language runtime to multiple platforms.

Web (Hybrid) stream

Common tools like PhoneGap/Cordova expose native APIs to JavaScript, but performance is often criticised. The author argues that the DOM itself is not inherently slow; rather, three factors degrade performance: early browsers lacking optimisation, overly complex CSS, and limited DOM APIs that hinder fine‑grained optimisation. Android WebViews before version 4 lacked GPU acceleration, causing full‑page repaints, while iOS WebViews are smoother. Simplifying CSS (e.g., using Famo.us) or avoiding HTML/CSS altogether (e.g., React‑canvas, Canvas, WebGL) are explored, though each has trade‑offs.

Beyond performance, the Web stream suffers from functional gaps because native APIs evolve faster than web standards, forcing developers to write native code for newer features.

Code‑conversion stream

This approach reduces duplicated effort by converting code between platform languages. Notable tools include:

j2objc – converts Java to Objective‑C; used internally at Google to share up to 70% of code between Android and iOS projects.

MyAppConverter – attempts Objective‑C to Java conversion, including UI frameworks, but is a paid product and its practicality is uncertain.

Sharpen – converts Java to C#; low adoption (≈118 GitHub stars).

JUniversal – Java‑to‑C# conversion with a small cross‑platform runtime library.

Haxe – a language that compiles to many targets (JavaScript, C++, C#, Java, Python, etc.) and powers the OpenFL game engine and HaxeUI, though its ecosystem is niche for general app development.

XMLVM – translates bytecode to an XML intermediate format, then generates C, Objective‑C, JavaScript, C#, Python, or Java; generated code is often unreadable.

Below is a snippet of code generated by XMLVM for an iOS "HelloWorld" class, illustrating the low‑level, assembly‑like output:

XMLVM_ENTER_METHOD("org.xmlvm.tutorial.ios.helloworld.portrait.HelloWorld", "didFinishLaunchingWithOptions", "?")
XMLVMElem _r0;
XMLVMElem _r1;
XMLVMElem _r2;
XMLVMElem _r3;
XMLVMElem _r4;
XMLVMElem _r5;
XMLVMElem _r6;
XMLVMElem _r7;
_r5.o = me;
_r6.o = n1;
_r7.o = n2;
_r4.i = 0;
_r0.o = org_xmlvm_iphone_UIScreen_mainScreen__();
XMLVM_CHECK_NPE(0)
_r0.o = org_xmlvm_iphone_UIScreen_getApplicationFrame__(_r0.o);
_r1.o = __NEW_org_xmlvm_iphone_UIWindow();
XMLVM_CHECK_NPE(1)
...

The author concludes that, while code‑conversion carries low risk, most tools are immature; only j2objc shows practical promise for sharing substantial code across Android and iOS.

Overall, the article provides a technical overview of the strengths and weaknesses of each cross‑platform strategy, helping readers decide which approach best fits their project requirements.

mobile developmentPerformanceCross-PlatformWebViewReact NativeHybridcode-conversion
Qunar Tech Salon
Written by

Qunar Tech Salon

Qunar Tech Salon is a learning and exchange platform for Qunar engineers and industry peers. We share cutting-edge technology trends and topics, providing a free platform for mid-to-senior technical professionals to exchange and learn.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.