This is part of a sort of series of blog posts that I've been writing in the last six years. These blog posts are about mobile development technologies. I don't go really deep into the technical details, but rather provide an overview of the techs: when you should use them and when not to. I wrote the first blog post in Finnish back in 2013. The second one I wrote in 2016, so it's about time for an update.
In three years things have progressed, but not revolutionized. Native development is still there and looks like it's not going anywhere. React Native is also still a factor and has got a lot more popular. A newcomer to the race is Flutter, Google's new framework. Some people still do HTML5 based apps, I suppose, but at Vincit, we haven't built one of those in a while. Progressive Web Apps, on the other hand, seem to be gaining momentum. A wild card in the race are various game engines, Unity being the most popular one. In this post, I'll give a brief overview for each of these techs.
Native Apps are still the most uncompromised way of making mobile apps. A lot of the big apps we build here at Vincit are native apps. For example, Superoperator's car wash apps (Android and iOS) and Hesburger's mobile app (Android and iOS) are native applications. The biggest upsides of native apps are:
- They allow you to do anything that the platform makes possible, the latest features are always immediately usable
- Most third party libraries and utilities are available as native code.
- With Swift (iOS) and Kotlin (Android) replacing Objective-C and Java, also native developers may enjoy the benefits of a modern programming language.
The obvious big minuses are:
- You need to write your app twice if you want to support Android and iOS
- Compile times are tedious. You always need to rebuild your app to see your changes on screen.
React Native has grown to become probably the most common cross-platform framework. When it started to become more popular, a huge amount of companies jumped on the bandwagon. Recently, some of those companies have come back to native apps. Airbnb published a great series of blog posts describing why they tried React Native and why they decided to fall back to native app development.
But while it may be true that React Native was not a good fit for Airbnb, it is probably the most commonly used cross-platform framework currently and does the job really well in many cases. At Vincit, we do like React Native and have published successful React Native apps, such as Yamaha WaveRunners App and KCRW App.
The pros of React Native are:
- Decent code reusability: most of the code is usable on both platforms. Only certain plugins and UI customizations need to be written separately for iOS and Android.
- Live reloading. All changes to code can be brought instantly to the app being tested. App also remembers its state, which is really helpful so that developers don't need to navigate back to the view they are testing.
- Good plugin architecture. If React Native does not support something, you can write either a React Native plugin or a true native plugin for it. But writing native plugins requires knowledge of native app programming. The developer community is broad and a lot of plugins already exist. There are not a lot of features that React Native plugins don't already cover.
And the cons:
- Certain UI elements may be a pain-in-the-ass to get right and require tons of fine tuning. Which takes time.
- Animation-heavy UI's may cause performance issues.
Flutter is the new kid on the block, but has Google's muscles behind it and therefore has come a long way in a short time. Flutter is quite different compared to most cross-platform frameworks in its rendering philosophy. Flutter does not use any native UI elements under the hood, instead, it has its own canvas-style renderer. That means that apps built with Flutter look exactly the same for iOS and Android and in simple cases run with the exact same code. This quality makes Flutter also a viable choice for 2D-games.
While Flutter's renderer makes a lot of things easier, it's not always good: iOS users and Android users are used to certain UX paradigms and having the same UI for both platforms require compromises. Flutter does have a solution to this, which is styled widgets. Flutter Widgets, which is Flutters name for UI elements, exist in Cupertino style (iOS) or Material UI style (Android). This makes them look native, but it also requires additional code. There can also be other kinds of styles. If you're interested in how Flutter works, this is a good technical overview about it.
At the time of writing in January 2019, Flutter is so new, that we don't yet have extensive experience in it at Vincit, but we have published a couple of smaller apps written with it. Based on those, the experiences are encouraging. Flutter is written with Dart language, which is a newer programming language.
- Instant reload as in React Native.
- Modern, new language: Dart.
- Good performance.
- If you write and test an App with Flutter for Android, in our experience it works without any extra effort on iOS too. And it looks exactly the same.
- Compared to React Native's documentation, Flutter's docs are really well organized and high quality.
- A new framework and Dart language - hard to find experienced coders.
- Limited support for many third-party libraries and tools.
But is Unity any good for anything else than games? Yes, it is - particularly multi-platform AR and VR apps. Or apps that have a strong gamification element or game-like UI. Unity has great plugins for AR and VR stuff and we've used it mostly on building those. I'm not going to go into pros and cons with Unity, but I wanted to mention it here, as gamification and AR/VR are probably raising more and more interest in the future.
Progressive web apps aren't really apps: they're websites disguised as apps. Their biggest benefit is that the user doesn't have to install anything and the onboarding from finding a link to the app into becoming a user of the app is seamless. But them being a web page brings limitations to using the platform services that are not available to the browser. The biggest one of the latter being lack of push notifications for iOS. For Android notifications do work. Other examples of missing functionality include smooth scrolling native maps, utilizing native SDK's for advanced camera utilities, and using Siri or similar device interfaces. With these shortcomings, I don't consider PWA's to be a real contender for real Apps, but they definitely have their uses. If you need none of the things listed above and are sure that a PWA could do the job, then they are worth considering.
At the time of writing this in January 2019, Apple is just rolling out iOS 12.2 Beta, which brings better support for PWA's. The list includes improvements to e.g. offline usage and sharing content from web apps. Push notification support is still not on this list, but the direction is certainly positive. It might be that in a year or so, PWA support is at a level where it's a real contender as a technology to almost any app idea.
Sorry to say, but I can't recommend anything over the other. Certain technology might be perfect for some app, but a big mistake for another. But here's a short summary of things to consider:
- Do you have in-house developers? What are the familiar with? Usually, for web developers, the transition to React Native is easier than something else. In general, for developers with no experience in writing mobile apps, some cross-platform framework is often the fastest way to get started.
- What's the lifecycle of the app? If it's going to be really long, remember that investing in some third-party framework is always a risk. Google may shut down Flutter and Facebook may stop investing in React Native. Native apps won't likely stop getting support from Apple and Google.
- Unity is great for 3D, game-like UI's and AR/VR. For 2D games, there are a lot more options - for example Flutter.
- Downloading an app means more friction for onboarding. PWA's are a good way to eliminate that friction - if you can live with the restrictions they still have.
If possible, do a few prototypes with different technologies before committing to certain technology and regretting it later.