Imagine that your company needs both web and mobile apps. There are many options available and the choice is sometimes hard. There are many factors that needs to be considered, such as:
- Is the web or mobile apps your priority?
- What are the main features of your apps?
- What is your product strategy? Short term such as for an event or long term system?
- Do you have a good existing solution for the web and just need mobile apps?
- Are you building from scratch?
- Do you have an existing development team with experience in a specific technology?
- Are you using contractors to build the solution?
Native vs cross platform fight has been going on for many years. There have been several cross platform solutions: React Native, Xamarin, Cordova, Phonegap, Flutter, etc.
Flutter may be the new challenger in cross platform ecosystems.
Native development is still strongly supported, developed and modernised by platform owners: modern languages (Kotlin / Swift), declarative UI patterns with Swift UI and Jetpack Compose are introduced.
Native app development
Programming languages are Objective-C (legacy) and Swift. You can mix them in legacy projects. Swift was created by Apple in 2014 and open sourced since. Swift is a modern, stable language. Developer tool, XCode, is provided by Apple. Recently added Swift UI and declarative, modern UI framework. All device functionalities that Apple made available to 3rd parties are accessible. Provides the real platform native look and fastest performance. Developing for iOS requires Apple HW so due to its price tag and resistance from some developers against Apple it is the most difficult to find good iOS developers.
Learning the language and iOS programming paradigms are also a bit time consuming. Official documentation guidelines are very obsolete and many occasions cited as ‘don’t do this’ (the famous MVC pattern). There are however, still a big community providing 3rd party libraries, tools and help. iOS new version adaptation is the highest, new OS versions usually supported by at least 5+ year old devices.
It supports both Java and Kotlin as native languages. Kotlin is considered the primary choice when making a new app and is also recommended by Google.
Kotlin is fully compatible with Java (runs on JVM), and the two can be used together in the same projects. Kotlin is developed by JetBrains and open sourced. The main developer tool is Android Studio (open source) built on top of JetBrains’ IntelliJ tools. Google introduced a new declarative UI toolkit called Jetpack Compose. Building Android apps in Java or Kotlin will give native look and best performance. It is considered cheaper and easier to start than iOS, more appealing to people as a lot of developers are already familiar with Java and the tools. Official documentations are kept up to date and Google provides good and modern patterns to build up apps. Lots of 3rd party libraries, tools are available. Device fragmentation is an issue, many vendors, version device combination, dead ends (like Huawei). Google will replace Android with a new OS called Fuchsia. Kotlin is also a cross platform language in itself it can be compiled to run natively iOS, macOS, Linux, Windows, etc… and can be used on any platform that runs JVM such as for backend development. This cross platform aspect of Kotlin is not discussed here.
However, UI code sharing (using the same React component on React web and React Native) is not possible, React web renders HTML elements, while React Native defines its own elements. So if someone already has a web app, then the React UI components must be forked (copied) and refactored and two UI code bases should be maintained. Non UI, business logic code however can be shared (much better if these code are on the backend though). It supports hot reload that can save development time.
React Native does not expose all native features that then platforms are capable of, native bridging is possible though. They also suffer from device fragmentation and weird bugs on certain device and OS combinations.
After some summary of each technology, let’s try to sum up in the table below our recommendations.
Native apps offer the best performance and most features, however they are more expensive to develop. In some cases they should be the first choice especially if your app needs functions like advanced camera, AR, heavy app CPU usage, gaming, navigation, background data processing, location tracking, etc. and you have a long term goal with your apps. It’s more challenging to build a decent native app development team.
To summarise, going for native apps means you will have three different apps: web (in any technology), Android and iOS. You can achieve the best result on all platforms; your app on each platform can adapt to the platform but the development and maintenance costs are higher. Native apps also should be adjusted annually when Apple and Google make changes to the platforms.
Flutter can really deliver on the cross platform promis, meaning implement once and run everywhere. Flutter mobile apps are executed as native code, performance and look and feel is comparable to that of native apps. Except for the few niche features where native code is necessary it can be a really good choice for apps. On the web the lack of SEO support is probably a no go for some cases, however, for web apps that logs in users it is not required. For MVPs or quick to market full scale (web and app) solutions it can be a perfect choice. If you keep the web and app UI design same or close you will have one code base. Separate web and Flutter apps may be a better option in the longer term however. If the initial reception is promising the web may be replaced later with a separate web solution (React, Angular, Vue, etc..). There are not many hands-on Flutter developers out there yet, but the learning curve is steep with good tutorials and documentation.
In most cases mobile apps written in Flutter and web developed in any web technology will give the best results.
Rule of thumb
- Choose native app if you need performance and device features
- Choose React Native if you have React front-end developers
- Choose Flutter for most mobile app where native is not required