How to pick the right Cross Platform Solution

Shai Almog - Jul 16 '20 - - Dev Community

I'm not exactly objective in this field as I'm the co-founder of a cross platform mobile development tool vendor. However, I'll try to be as objective as possible and help point you in the right direction. I think there are many great tools out there that aren't made by us and this isn't a "one size fits all" market.

But before we move forward I'd like to discuss why you should use a cross platform tool. A lot of times people make the mistake of looking at the cost of building a native app and thinking "why not"?

You can outsource the app building and have a native OS app built for 20k USD or so. The main problem with this mentality is the maintenance is far more expensive in the long run. Every bug, feature and update will end up costing far more in the long run depending on the lifetime of your application. The ability to shorten development cycles is crucial as frequent updates/fast response are probably the most crucial aspects of a successful app.

The problem is that people often use cross platform tools to cut costs instead of using them to shift costs. Take the money saved in development/maintenance and spend it on QA, design etc. That's why some of these tools get an unjustified bad rap.

This isn't news, this was always the case which is why cross platform tools took the desktop by storm more than 20 years ago. The reason this hasn't been so clear in mobile is due to maturity issues with these tools and the platforms themselves both of which have matured significantly in the past decade.

The System

When I'm asked how to pick the cross platform solution that is "right for you" I have a very simple system. Notice that I ignore the "no-coding" solutions as they are too simplistic for most use cases. It's comprised of the following 4 multiple choice questions:

  1. What is your programming language of choice: C#, Java, C++, Ruby, JavaScript, HTML+JavaScript, Basic

  2. Do you believe in Write Once Run Anywhere (WORA) - many developers like cross platform but they want to keep it as close as possible to native. Others want the convenience and power of one code for all devices

  3. Which platforms do you need to target: Android, iOS, Windows Mobile, Desktop, Web

  4. Are there special features required in your app e.g. - Google Maps, Augmented Reality, System widgets etc.

Based on the answer to these questions it's pretty easy to determine the best tool for the job.

Question 1: Programming language of choice

Each tool has its own programming language of choice. This might not be the deciding factor but often is a great starting point:

  • C# - Xamarin
  • Java - Codename One
  • C++ - Qt
  • Ruby - RubyMotion
  • JavaScript - (See HTML+JavaScript) React Native, Appcelerator, NativeScript/Telerik
  • HTML+JavaScript - PhoneGap, Ionic, Sencha etc.
  • Basic - Basic4Android/iOS
  • Kotlin - Kotlin Native, Codename One
  • Dart - flutter

Question 2: WORA (Write Once Run Anywhere) vs. Shared Code Portability

This is a conceptual question. The more portable tools usually provide faster development cycles and often easier development by reducing platform differences.

The price is paid in distance from the underlying platforms, this price might be worth it and might be an advantage as it allows you to enforce corporate/app branding more thoroughly.

I'm a big believer in WORA so I'm far from objective on the subject, but I find this is more of a religious debate in many cases than a factual debate (there are facts but they vary and are open for interpretation). If you think that WORA apps are inherently or usually flawed then picking a WORA solution might be problematic.

Other solutions use portability layers that allow you to share common code, from my experience this usually amounts to 50% of the code being common. Some developers claim up to 90% which I have never personally witnessed and assume they just define things such as XML UI code as "not code". Typically solutions like this save far less as you need to abstract the shared portions of the code leading to more code...

This isn't necessarily bad as abstraction is a good engineering practice but it does make things more complicated and more verbose.

If you believe in WORA then one of these solutions might be good for you:

Codename One, flutter, QT, PhoneGap (Ionic, Sencha etc.)

If you don't then one of these might work better:

Xamarin, RubyMotion, Appcelerator, NativeScript, Basic4Android/iOS, Kotlin Native

Question 3: Target Platforms

All of the above support iOS and Android. If you need more then these platforms support them:

  • Windows Mobile (UWP) - Xamarin, Codename One and PhoneGap (Ionic, Sencha etc.)
  • Web - Codename One, flutter, PhoneGap (Ionic, Sencha etc.), Kotlin Native
  • Desktop - Xamarin, Codename One, QT and PhoneGap (through electron). Note that there's experimental support for flutter at this time. It's unclear how well Kotlin native works on desktop platforms but there seems to be some work in that direction

Question 4: Special Features

This is something you need to list and ask the respective vendor e.g. if your application relies on Google Maps you need to know if the platform can support embedding such a feature into the app. All of the above solutions support common features such as location, camera and typical UI's.

However, if you have a specific requirement you need to run that by the support channel for the vendor or simply do a google search on that. I would suggest asking anyway as this world is rapidly changing and a result you might get from Google might be outdated by now.

Extra Tip

Don't take my word on this. There is a nice comparison site called property cross which is an open source community project. It defines a standard webservice driven community app that each vendor implements with his tool. You can then inspect the various implementations and contrast them with one another.

Some of the implementations vary because of coding style but they show the differences between the various cross platform solutions very clearly.

Finally

I skipped over a lot of tools in this review because there are many, I tried to focus on the relevant tools applicable in business settings so I ignored gaming oriented solutions such as Unity which would have impacted this writeup and made it far more confusing.

If there is a specific tool that you are curious about feel free to ask in the comments and I'll try to place it within the answer set above.

NOTE: This is a repost of an original article that was written a few years ago (pre-flutter and pre-kotlin native). I refreshed it but most of the facts remain as they were from back in the day.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .