Android app development: native or Cordova?

To better appreciate a new technology it is sometimes necessary to learn what was done before. With this in mind, and after developing the Cordova/PhoneGap Foot Rank mobile application for iOS and Android, we followed a training course on Android 5 native app development. We now share with you our impressions on these two technologies: native VS Cordova.

The Foot Rank app, based on Cordova and News'Innov

FootRank is a mobile app that leverages the News'Innov service (via a REST API) to bring you the latest Euro 2016 news: relevant articles, but also players' popularity over time.

Designed in only 2 weeks by a team still new to mobile development, Foot Rank is based on Cordova and Ionic. Our technical choice is explained as follows:

  • Cordova: to develop in HTML/JavaScript and target the main platforms (iOS and Android)
  • Ionic : to use AngularJS, technology perfectly mastered by our team

Android 5 training

5 days of training during which a ContentSide development team experimented the design of native Android applications with Android Studio 2, Java 8 and Gradle. We started from the basics (layouts, fragments, permissions, emulators...) to more advanced concepts such as services or GoogleMaps integration.

How we felt during this week of training

Developing native apps has shown us how old school and low level this practice is. Some features that are simple at first glance require a significant investment from developers. For example, it is not possible to display a simple list: without the RecyclerView concept, scrolling will be badly managed and your list will be disorganised.

Perhaps the most obvious advantage of native apps is its device management. The management of portrait/landscape orientation and resolution is very powerful and intuitive, whereas Cordova forces us to think "responsive", like a website.

The other advantage is of course performance. Developing a native app gives more control over responsiveness and battery management than a Cordova app. In fact, the main drawback of Cordova, especially with Ionic, is the poor graphical performance: since Ionic relies on AngularJS, the limited capabilities of a smartphone are easily put to the test, causing jerks and slowdowns (although Ionic 2 promises to do better thanks to AngularJS 2).

Also, the amount of code to be generated seems much greater than in a Cordova app, even if tools such as Android Annotations (in the same spirit as Project Lombok) make our lives much easier.

In comparison, Cordova provides an important abstraction layer and simplifies the use of many concepts. However, we keep in mind that if Cordova does not support all native features out of the box, this can be solved by developing plugins.

Should native applications be developed?

The Cordova / Ionic couple can finally give full satisfaction if it is a question of simple applications consuming a REST API, and with surely technologies that you master (HTML/JavaScript, AngularJS).

But be sure that if the frameworks don't know how to answer a need (or not well), you will find your answer in a native application, or by developing Cordova plugins using native code.

With hindsight: we now understand why technologies such as Cordova, CodenameOne, Duckscript, Xamarin, etc. have emerged, and when to favour native code or not.

Also, we are looking with great interest at recent technologies such as NativeScript, which allows the development of native apps from JavaScript code (or better, TypeScript): the best of both worlds!

Are you interested in this topic?

CONTACT US