Cross platform mobile app development: Native VS Webview VS React-Native


These days you can’t get around a mobile app, and you want to support at least the Android and iOS platform. Two platforms with different languages and coding environments… those who can count will instantly see double the work, nobody wants that! Luckily there are some techniques to speed up the process and target multiple platforms with the same code base.

Native code for each platform specific is a no-go, the first alternative is using webviews. You can implement a backend-frontend communication mechanism yourself or use Apache Cordova/Phonegap and use their build in features. The point is that your front end is a webpage and that you can use a lot of web-plugins to make it fancy. The downside is that this adds a layer and is more cpu and memory intensive. You will need to write native plugins (the framework-way) if you want to take full advantage of all device and os capabilities. On slower devices your front end animations may look a bit laggy…

In website-land, the long used market leader jQuery with different kinds of frameworks for front end stuff like Angular, Marionette, … got a new competitor: React, by Facebook. What React does differently is the way it renders stuff. React always renders a complete part of the screen, then calculates changes that have to be made to the DOM, making it lighter for the browser than the traditional frameworks. React also has a native brother that targets the Android and iOS platform. Here you describe your screens in a html-like language with css-like styling. The description and logic can be programmed in javascript (which runs in a hidden webview), but will be interpreted by the native part of the framework that renders native components. So cross platform mobile app development with React Native, is it the holy grail? Not really, but as close as it gets imho! Less technical front-end developers who know html, css and javascript can build a ‘native’ app, but you will still have to dive into the native code when there is no library available to do what you have in mind and some styling stuff does not yet work on all platforms! Although these disadvantages, it is the most easy non-native manner of coding mobile apps which are more native than a webview. Libraries for React-Native are fetched with the well known NPM. Check them for platform compatibility since some older ones support only one platform, and verify their quality as I already told in my other post Libraries, perfect building blocks or dangerous explosives?

Leave a Reply

Your email address will not be published. Required fields are marked *