C++17 Ideal for Mobile Cross-Platform Development

Mobile Cross-Platform :

  1. Android
  2. iOS
  3. Windows
  4. Linux
  5. Web
  6. HongMeng (aka Harmony) OS
  7. IoT

Cross-platform C++ in IDE :

  1. Mac : Xcode, Android Studio, Visual Studio on Mac (fee), Eclipse
  2. Windows : Visual Studio (full featured, pay fee), VS Code (limited feature, free), Eclipse
  3. Linux : many eg. Eclipse…

“So you want to write cross platform code, PAL? (Part I)” by Gal Shelef https://link.medium.com/ijqPGGDWd0

Apps Architecture:

The Salami Method

  • Cross-platform Language: C++ (preferred version 17 with STL for Functional Programming)
  • Apps divided into 2 parts:
    • UI logic: platform specific
      • Android : Java / Kotlin in Flutter framework
      • iOS: Swift / Objective-C
    • Core logic: C++17

Platform-specific Binding : PAL

Flutter vs React Native vs Xamarin or Native Codes: Which is the best choice for 2019?

Mobile Apps developed for cross-platform : iOS, Android, Web… (Huawei HongMengOS ? )

  1. Flutter (Google) — Dart
  2. Xamarin (Microsoft) — C#
  3. React Native (Facebook) —Javascript

https://towardsdatascience.com/flutter-vs-react-native-vs-xamarin-which-is-the-best-choice-for-2019-2bc30fc76442

The above analysis for the 3 tools is neutral – beauty is in the eye of the beholder – they are more or less the same family based on current Object-Oriented paradigm.

However, I would recommend a 4th option with additional future-promising Functional Pragramming (FP) paradigm for multi-platform mobile apps:

4. Native Codes in C++ (Version 17) with Standard Template Library.

  • C++ can be developed in Android Studio, called by Java / Kotlin / Flutter via JNI interface.
  • Or in React Native IDE.
  • IEEE 2019 Ranking : C++ / C is ranked 3rd popular language behind Python (1st) & Java (2nd), but it is unique in multi-paradigm & multi-platform, an advantage compared to the others.

Kotlin 1.2 Multi-Platform Project

This language feature of writing only once and run on many platform was promised by Java in 1999 through JVM.

Kotlin, a successor of Java supported officially by Google since May 2017, goes further than Java on ambitious multi-platform, not only through Android’s Delvick JVM (a modified version of Oracle’s JVM), also on JavaScript engine (in supported browsers), and compiled to (future) native codes on Microsoft Windows…

http://kotlinlang.org/docs/reference/multiplatform.html

Kotlin 1.2 Beta Release 30/9/2017:

https://blog.jetbrains.com/kotlin/2017/09/kotlin-1-2-beta-is-out/