Before you start working on a mobile app, you may ask yourself a question: should I choose a native language designed for the targeted platform or perhaps use one of the popular wrappers that allow writing code using only one language for all platforms – that language usually being JavaScript with HTML5 and CSS. Code written this way is then placed in a native container which enables distribution to AppStore or GooglePlay.
In the latter case, you only need to be proficient in web technologies.
There are three possibilities to develop mobile applications:
- write native code
- write HTML5/CSS code only
- write hybrid app with JavaScript and HTML5/CSS
Hybrid applications can benefit from both native and HTML5-only development. Where possible you can write application elements reusable across many platforms, and when it is necessary (for example when you need access to hardware of device) you can generate request and get access to native components.
Pure HTML5/CSS applications are easy to write but have no access to the device’s functionalities, so their options are severely limited.
Recently, when starting a new mobile project at Espeo, we considered two ways: creating an Android application with native code in Java or using one of the hybrid JavaScript frameworks – Ionic, which allows for a single codebase for both Android and iOS.
While making up our mind, we were at first more into Ionic – what could possibly be better than one codebase to develop an app for all platforms? Well, theoretically creating such an application is quicker, easier to create views (HTML), and we would only need web development know-how. Then again if it is so cool, why are there still so many native-written applications out there?
Disadvantages of hybrid applications
Besides limited access to device features, one of the biggest disadvantages of hybrid applications is their significantly worse efficiency. They are much slower, and much less responsive, and the difference is visible even on devices with good processors. The efficiency depends on the type of application and the smartphone. This is worth considering if you’re for example targeting the Polish market with a big share of subpar devices offered by mobile operators.
An application that is slow on top-end machines can cause serious problems, including crashing and restarts, on lesser ones.
A major issue of multi-platform applications is also their hampered user experience. There are certain standards and best practices of mobile application design – different for Android, iOS and Windows Phone. It is difficult to provide well-designed views for each platform – especially when you want your app to be user-friendly and easy to read.
Advantages of hybrid applications
There is one very important advantage of writing mobile apps using a framework like Ionic – it’s usually cheaper (it can be of course more expensive if you have to develop twice: once in Ionic, and then in native languages, because Ionic did not meet your expectations).
You don’t need know-how in many fields like Java (Android), Objective C or Swift (iOS) or C# and XAML (WP). It is also easier to maintain such an application.
Therefore Ionic seems to be suitable for small apps, which should be easy to code, but don’t need a lot of content, don’t use most of the device functions, don’t have to look particularly pretty and be particularly fast.
In other cases, when you want to produce good quality product – fast and good looking, which works just fine on older devices – you should probably develop it in a native language written mobile application.