More on multi-platform mobile development

All software engineers hate to write the same thing twice. However, at the moment it seems unavoidable when one wants to support both iOS and Android. Some strategies exist to avoid them, however none is perfect. For example, Phonegapp allows to develop your application in HTML/JavaScript, but the look and feel is not as native as one could wish, performance is bad for anything complex and your code is at the mercy of hackers. There are some commercial platforms which allow you to write in C# and then deploy on both iOS and Android. This is not ideal either, until Apple and Google respectively start supporting .NET officially.

One option going forward might be QT, which started providing iOS and Android targets for its toolkit. Unfortunately, at the moment it is not usable - the number of bugs is larger than the number of features. However, C++ could be a (partial) answer. If your application has considerable internal logic that can be clearly separated from the GUI and exposed to it via a relatively simple API, it can be implemented in C++ and then shared between iOS and Android. This way you will only have to duplicate the GUI code. Not ideal, but better than rewriting everything. For Android you will be using NDK and for Apple - Objective-C++. Some platform-specific C++ glue code might be required as well, but such is life. I plan to try this approach as phase II of my personal project (phase I is currently in development using Scala/scaloid, Android will be supported first).

Here is an interesting article comparing different mult-platform techniques from SkyScanner (a popular flight search service). Make sure you check parts 2 and 3 for more technical details and code samples.

Add new comment