Mobile apps are an important asset for any business - usually a key tool to drive user engagement, customer acquisition and brand building. Your mobile apps may even be the sole product or service a business offers. There are several goals that every mobile app should aim for, including ease of use, powerful functionality and great performance. It’s important that careful consideration is given when deciding how to implement a mobile app. This should include seeking advice from an experienced developer who has experience with a variety of mobile app development frameworks.
What is a native app?
When Apple and Google first created smartphones that allowed third party developers to build apps to install on them, the apps needed to be written from scratch separately for each platform. Apps developed in this way are written in a language specific to each device’s operating system - and therefore the “native” language of that device.
Google’s Android operating system runs apps written in Java, while iPhone and iPad apps are written in Objective-C, although Apple has recently introduced a new language called “Swift” for iOS development. The new language is an improvement in many ways. It's easier to write and read, safer and improves performance.
Making native apps for each platform requires creating and testing the app from scratch in each language.
What is a hybrid app?
There are several frameworks available that allow developers to build apps that work on multiple platforms but share some or all of the same code. These are known as “hybrid” apps, because native and shared code is mixed together.
Developing a hybrid app sometimes makes it easier to release for more than one platform, without having to write the functionality of the app in different programming languages separately for each one. A high level summary of the release process for a hybrid app is as follows:
- Code to be shared between apps is written once in a single language. This code can be just the background logic for the application, the user interface, or a combination of both - the exact requirements of the app will determine what code can be shared.
- Native code is written in separate languages for each platform, if required. It may be that some features can only be written natively, or more likely, they need to be written in the native language for each platform so they’re reliable and function as expected. Again, it depends on the exact requirements.
- The native and hybrid code is combined and built into a separate release package for each platform (Android, iOS etc).
- The app is tested thoroughly on devices and changes are made if required. Sometimes functionality won’t be as expected, and small modifications may be necessary to enhance the user experience.
- The app is released separately in the respective app stores (Google Play, iTunes etc).
There are many ways to create hybrid apps, frameworks such as PhoneGap, Ionic, Titanium and Sencha Touch are all available and provide different ways of writing code that can be shared between devices. The technology being used will determine the amount of code that can be shared between each platform, as well as how the final app needs to work. Therefore the decision also depends on the content of the app and the final requirements.
Hybrid apps almost always need at least a small amount of native code, depending on what they need to do. For example, an app that takes pictures using a device’s camera will need some native code to access the camera or gallery app and retrieve a picture. Some frameworks, such as those based on Apache Cordova, have a huge library of open-source plugins that allow the hybrid app code to access native features of the device with the developers having to write a minimal amount of native code - sometimes none. This is a great benefit, as most standard native device features such as camera, geolocation, battery, in app purchasing, network information and more can be accessed through the hybrid app with minimal native development work.
Even when such plugins aren’t available to access native features from the hybrid code, they can be created. Even though they’ll need to be created for each platform, it may still be more efficient to create an app in this way because of the time saved by only having to write the plugin code for each platform, rather than the entire app.
What about web apps?
Web apps are pretty much what they sound like - a website that behaves like an app. Web apps are websites designed for mobile devices such as phones and tablets that are framed inside a native app. To the user, they look like just another app, but they function very differently to most other apps.
Web apps will usually require a lot less development effort when compared to hybrid or native apps, but they’re more restrictive in a number of ways.
The app may not be approved for release because it frames a website - Apple’s guidelines don’t allow this, although some web apps are currently available through the iTunes app store.
The app requires an internet connection permanently, because it’s loading web pages. This can be a problem if any part of the app is required to work offline.
The app is dependent on the reliability of the data centre hosting the website. If the site is down, the app no longer works.
Changes to the app functionality doesn’t require an update because the website can be updated instead. This can be seen as an advantage, but it can cause even more problems. Users may not be aware that functionality has changed, release notes in the app stores don’t match the app’s actual behavior and bugs aren’t always caught during testing. There are ways to get around these limitations, but they normally create extra work that could be avoided.
How to implement your mobile app - what method to choose?
An experienced app developer (like us!) can help you choose the best way to implement your app, and needs to advise you based on your app’s individual requirements. There are three main areas that should ultimately affect the decision you make:
Native apps generally perform better than hybrid apps. However, careful development can ensure that any poor performing hybrid applications can be optimized as much as possible. If an app is particularly complex, or contains several powerful features, we would recommend a native implementation, or at least part-native - as some code may be able to be shared between platforms.
Some features, especially real-time functionality or complex graphics, would be better implemented in the native language of the device to ensure they run smoothly. Others however, such as rendering text and pictures, could more easily be created with hybrid app frameworks.
A good example of a hybrid app that should have been a native app due to performance is the original Facebook apps for Android and iOS. The original apps were created as hybrid/web apps and they were slow, especially on some older devices. In August 2012 Facebook replaced them with native apps, which provided a better user experience and were more responsive.
In general, hybrid apps are faster to develop because the majority of code only needs to be written once. They’re also easier to test, because most of the technologies used for hybrid development have been tried and tested on each device, so that most functionality will immediately work on several platforms with minimal additional development work.
The costs associated with hybrid app development are generally less than those for creating a separate native app for each platform. Development companies may charge an individual price for multiple platform support with a hybrid app, compared with per-app pricing for native development.
However, the cost of some hybrid app development frameworks can be quite high and sometimes this offsets the difference in development cost.
Because native apps require a separate implementation for each platform language, they take longer to create, test and refine. Even though there’s a difference in development time, hybrid apps can sometimes take just as long to create - especially if unexpected issues are raised during testing.
Best of both worlds
It’s possible to create apps that are part-hybrid and part-native. This can deliver a good balance between performance, cost and development time.
For example, you may want a different UI and layout on Android devices compared to iPhones. Each platform has a particular “feel” to its UI and you may want buttons and form fields to behave as a user expects them to on each platform, as well as the positioning and layout of other elements such as grids and menus.
Some hybrid app frameworks such as Xamarin allow the creation of the layout to be specific to each platform, while some of the code can be shared across multiple platforms.
Apps that offer 3D graphics, gaming or simulations can benefit from some hybrid frameworks such as the Unity game engine, which allows some of the graphics and game engine to be shared between platforms more easily than if they were developed separately.
Performance problems with hybrid apps are usually because a framework uses HTML (the markup language used to create web pages) to handle the layout and user interface. Depending on what’s being displayed, this can sometimes be slower to render and interact with compared to the native user interface elements. However, some frameworks actually create a native user interface from the hybrid code, which gives you the best of both worlds - you get a native app UI implementation created from sharable code.
Neither hybrid or native app development should be considered the best choice. In reality, choosing between them really depends on a combination of what the app needs to do and the budget for development.
If you only want to make an app for a single platform, native may be the way to go. Alternatively, you might want to make something as quickly as possible for release on multiple platforms with limited or basic functionality, and this is when the hybrid approach might be worth considering.
We have extensive experience creating both hybrid and native apps. Get in touch with us and we can talk about the best way to implement your app.