Spiria logo.

Native application development or hybrid approach, which one should I use?

July 6, 2016.
App Dev

App Dev

In the mobile world, there are two ways of developing applications: either by creating an application that can be cross-compiled across platforms, or building the application natively on each platform. Many people tend to see this as a binary alternative: either you pay twice the price to reinvent the wheel, or you use a single code base to build a single, poor-quality application. The truth is, software development is never black and white.

Let me start by trying to explain the different approaches.

Native Applications

A native application is one that is built for a specific platform using the tools designed for that platform. This lets the application interact directly with the operating system features and other software that may be installed on a device. Each platform that you would like to support will need its own application with its own source code, but with a native application, the look and feel will typically be more familiar to your users, with better performance.

Hybrid Applications

There are many types of hybrid applications. Lately, there seems to have been an emergence of new platforms to cross-compile code, for example React Native or Xamarin, but I will focus mostly on Cordova (or Phonegap1). Cordova applications can be written in Javascript and HTML, with the developer then building a new version of the application for each platform, always using the same source code. This can save time and make it easier to time releases, but the extra layer needed to run the application can make it run more slowly. Mind you, with the new tools available to developers and the ever-improving hardware in users’ hands, hybrid applications can often look and feel very similar to native applications.

So which one should I use?

This is where it gets tricky. It really depends on what you want in the long run for your application. It is true that hybrid applications can save development time and reduce your costs; however, if you find yourself hitting the limitations of the cross-compiler and having to write your own plugins to Cordova, you might end up falling behind, while the code base quickly becomes hard to maintain. Conversely, if you have a basic application that simply interacts with servers to provide information to users, native applications might add some overhead and you could end up spending more resources on it than you should.

As a rule of thumb, if you are building a small application that is meant to provide information to users but does not need access to specific hardware from the devices that you are targeting, a hybrid application can be a good solution. If you are building an application that will eventually need access to some of the hardware components, like the camera and the GPS, it makes sense to start native development right away.

What about prototyping?

This is an easy trap to fall into. Hybrid applications are great to build a quick and dirty prototype. If you want a basic product with close to no functionalities to share with your stakeholders, hybrid applications are ideal. But keep in mind that if you eventually want to add more features, you might go down the native path anyway, forfeiting all your work on your prototype and needing to start from scratch.

Final Words

When planning your application, always keep in mind your foundation. Determining which platforms you want to target and having a good long-term vision of your product will be key when deciding which type of development you opt for and ensuring the success of your product.

[1] Phonegap is Adobe’s distribution of Cordova, but they share the same source code.