<onWebFocus />

Knowledge is only real when shared.

Mobile App Framework Choice

November 1, 2021

Relevant factors when choosing how to build an app.

There are many frameworks available to build mobile apps for Android and iOS. Broadly speaking, they can be put into three categories:

Developer Type

Native development is quite different from Web Development. Mixed and Browser approaches share much more with Web Development than with Native development. That's why, for a native developer it doesn't make sense to switch to a Mixed or Browser approach in order to create apps. Learning native development takes significant time and implementing features is usually more difficult as the ecosystem and documentation in no way match the web platform and a lot of things have to be done by hand. Additionally, at least two developers are required, one for iOS and one for Android. Unlike when creating Native apps where a single developer can usually create an app for both Android and iOS using a Mixed and Browser approach.

For the previously stated reasons, a Web Development background is assumed for the following assessment.

Native Code

Using a Browser based approach will save a lot of time and avoids the need to write and maintain duplicated code for two platforms. Still, native apps offer functionality that's not available in the browser but sometimes required to create the app one desires. The Browser and Mixed approach differ in how well they integrate with native functionality. To use native functionality both approaches require native modules that are connected to the runtime running in a different programming language. The more prevalent the use of a certain native functionality the more likely it's already been implemented as an Open Source module. For example the native camera functionality can be accessed through react-native-camera on React Native, cordova-plugin-camera on Cordova or the Camera Plugin on Flutter. If the native functionality is available in this way it can usually be integrated with basic Web Development knowledge and no background in writing native code is required.

When it comes to native modules there is a big difference between Mixed and Browser approaches. An app written with the Browser approach will only be able to display UI elements rendered by the browser. Mixed approaches on the other hand render everything using native UI elements which makes it possible to insert any kind of native UI module everywhere. When it comes to features for creating UI elements the Browser approach is generally way ahead of the native UI elements used in a Mixed approach. This isn't considering the basic elements specifically created for mobile which otherwise are also used on the desktop browser. Still, native UI elements simply cannot be used in a Browser approach, but sometimes they can be imitated very closely which might be enough.

Writing native modules as a Web Developer is to be avoided at all cost.

Writing native modules yourself can require significant knowledge of the native platform itself. Therefore, this is to be avoided at all cost. Unless, only a simple native interface has to be exposed. In this case even a Web Developer can get away hacking together a quick native module without too much effort.

Analyzing the Context

As mentioned writing native code to access a desired functionality only present on the platform and not the framework is to be avoided. As a Web Developer even just creating a simple native module for both platforms can easily double the time required to create the whole app.

In order to make a decision which framework will be best to create a certain app it's necessary to know the requirements in advance. Especially, the requirements possibly relating to native functionality. Once the requirements are known it's time to take a look at which platform already has existing native modules to meet the requirements. As a rule of thumb the more popular a certain native functionality is the more likely there already is a preexisting native module.

A Browser based option is best if all native functionality is available as plugins.

If native modules for the Browser option can provide all necessary functionality it's best to go with a Browser based option. A seasoned Web Developer will always be able to create a better app in less time this way. If native UI elements are needed the Mixed option should be checked if such a native module exists. If so the Mixed option can be used. However, if new native functionality is required it should first be checked if this requirement can somehow be avoided or worked around. When a native module is required there are three options: Write the native module as a Web Developer (often signigicant learning curve), hire a native developer to create a native module and integrate it into the Mixed apprach or hire native developers to create two native apps.