As the mobile platforms have matured so have the tools used to develop for them. Choosing a suitable technology is crucial in achieving the best results.

As the smartphone has become an essential part of our lives, we interact with different services and do various tasks through them. The mobile platforms have matured into vibrant ecosystems filled with great applications. Hence, the tools used to develop these apps have also evolved. Today there are a few different ways to develop a mobile app each with its own advantages and drawbacks. In addition to the traditional native SDK way of developing mobile apps, technologies like React-Native and Cordova now provide an alternative way to build applications.

The Native way

The default way of developing an application to a mobile platform is with the development tools provided by the platform holder. In iOS this would be Xcode together with Swift (or Objective-C) and Android Studio with Java (or Kotlin). The end result from developing with these tools is a native app. When developing a native app, the developer can leverage all the tools available from the platform SDK. This means that any new feature released to the SDK’s is available for use instantly. These tools have also developed into mature state with everything integrated into the development environments. However, as the native tools for Android and iOS can not share any code, the mobile app has to be developed from scratch for both platforms. Although the platform sdk’s share some basic ideologies, they have different code language and differing approaches to for example user interface definition. Building an application for both platforms requires knowledge from two different technologies.

 

The Cross-Platform way

An alternative to developing both apps natively is to utilize the cross-platform way and use a tool that allows the developer to build both platforms with the same tool. However, many of the cross-platform technologies have additional limitations related to concurrency when compared to native apps.

Apache Cordova was one of the first ones to develop a cross-platform app. (Also known as PhoneGap) With Cordova, the developer can leverage different web development technologies to build an app for both iOS and Android. This means that unassociated platform apps can share a code. The resulting app from Cordova is a hybrid app which uses an embedded browser behind the scenes. However, as the app is running in a browser, it cannot use all the features available on the platforms. To combat this limitation, it is possible to use native plugins for each platform. A plugin is a piece of the app developed with native code and plugged in to the Cordova app with JavaScript. Cordova apps can also use tools like CodePush to enable updating the app directly without submitting a new version to the app store. One of the major drawbacks with the browser based hybrid app approach is that the app doesn’t leverage the native user interface of the platforms. Rendering the UI with html and javascript is not as smooth as with the native UI layer. This can result in suboptimal user experience as the feel of the hybrid app is not as smooth as native apps.

Another approach to cross-platform development that has been gaining traction lately is React-Native. React-Native is a mobile focused version of the React web framework that allows the development of mobile apps for Android and iOS using the same codebase. In React-Native the development is done using Javascript and JSX. This may sound similar to Cordova, but there is a major difference in how the app is rendered. React-Native leverages the native UI layer of the platforms instead of an embedded browser. The native implementations of UI elements is wrapped with JSX, a language that combines XML with  JavaScript, to components. React-Native framework offers many components for both platforms wrapped with JSX and the developer can wrap custom native elements as well. This can bring the UI performance close to the native apps. The app logic runs with the JavaScript engine of the platforms. Like Cordova, React-Native can also leverage native plugins and tools like CodePush. React-Native is still relatively new and evolving. It does not yet have all the features that are already offered by native SDKs or Cordova.

 

The right tool for the job

Each of these tools can be the right one depending on the application. The appeal of developing an application with a technology that allows sharing code between platforms is an obvious one. However, the choice whether to choose a native or cross-platform tool is not as clear cut. To develop apps with the latest features and the best performance, using the native tools is the preferred approach. For services that already have web frontend and web developers, using Cordova can get the mobile app done fast. The middle ground between these can be fiound with React-Native which allows the development of cross-platform apps with JavaScript. There are other tools for developing mobile apps that I have not yet mentioned. These include tools like Xamarin that allows cross-platform development with C#, NativeScript that uses Angular, and Flutter that is a new cross-platform tool with Dart language. Choosing a suitable technology to build your mobile app will lead to better results.

 

 

Native SDKs

Apache Cordova

React-Native

Pros

  • All of the features available that the platform offers
  • Gets the latest features
  • Best performance
  • Can use existing HTML, CSS, and JavaScript
  • Build for both platforms from the same codebase
  • Can update codebase without new store version
  • Build for both platforms from the same codebase
  • Better UI performance than in Cordova because it leverages native UI
  • Can update JavaScript code without new store version

Cons

  • Different platforms require building from scratch
  • User interface performance is not optimal
  • Advanced platform features require writing plugins
  • Still relatively young technology and does not have all the features the other 2 have
  • Advanced platform features require writing plugins

How May We Help You? We are here for you. Let us know the challenges your organisation is facing and we will find a way to serve you. Maybe we'll end up building something awesome together!

Published: Oct 11, 2017

Updated: Mar 26, 2024

Software development