Mendix Mobile — Native or PWA?

Wouter Penris
Mendix Community
6 min readJun 29, 2022

--

Mendix Mobile — Native or PWA? (Banner Image)
Mendix Mobile — Native or PWA?

Mendix Native has been out for a couple of years now, and it seems it is on the rise indeed! We see more and more companies making use of Native technology to release their prized mobile apps. However, more recently Mendix also released the option to publish a mobile app as Progressive Web App (PWA). On top of that, Mendix Hybrid apps were deprecated due to Adobe’s decision not to continue with PhoneGap.

That leaves the essential question to ask when (re)designing the architecture for your mobile app:

What technology should I use for my mobile app: Mendix Native or Mendix PWA?

Mobile Apps

Native and PWA Basics

Let’s start by looking at the basics of the technologies. Mendix Native is built on top of React Native, a JavaScript-based open-source framework to render content on a screen, and it was initially developed by Facebook. Their aim was to use a single code base that allowed deployment to all sorts of devices (e.g. phones, tablets, TVs) and operating systems (e.g. iOS, Android) while keeping optimal performance, as they had been having issues with performance across devices/OSes. Mendix Native follows in that exact multi-platform/multi-OS spirit.

More recently, Progressive Web App technology was developed by Google. The name PWA itself already hints at the underlying technology: it is a type of web application, which uses classic HTML, CSS, and JavaScript to render elements on the screen. This is also why Mendix PWA technology, which was only just released in 2021, is very much in line with the older Mendix Web apps we are so familiar with, and which we have been creating since Mendix’s inception in 2005. Google’s main aim was to make it easy for users to access applications, allowing a user to install the application directly from a website, as opposed to using an app store.

Mendix Native Pros and Cons

Let’s start with the three major cons of Mendix Native technology before we look at the pros. First off, due to its JavaScript nature, Mendix Native requires the extensive use of Nanoflows, meaning many of the older (hybrid) apps built-in Mendix (before 2019) are not easily eligible for conversion to Native; the data-retrieval patterns required for constructing a proper Native app are quite different from the older and better-known web/hybrid apps that Mendix started with. When converting an older app to Native, it will also have to be restyled using JSS. This means that converting a Hybrid app to a Native one can be an expensive venture. Moreover, considerable effort will have to be invested into acquiring the knowledge needed to use these new data paradigms (non-/and persistable) and JSS styling.

Secondly, Mendix Native apps can be quite difficult to publish; Apple, specifically, has quite strict requirements on what content can be published into its AppStore. There are ways around this. For instance, it is possible to publish the app using Microsoft Intune, or other dedicated customized company app stores. On the other hand, Android is much more open, allowing any app to be installed. This means that if your company uses Android devices, publishing will not be an issue.

Finally, Mendix Native technology involves code, which goes somewhat against the LowCode nature of Mendix. In order to compile an app, you will likely have to use NPM, and various other code-heavy tools to package a build. Another example is constructing the JavaScript styling classes used to style widgets and pages. In my experience, this can be learned without much trouble, but there is a learning curve here that has to be taken into consideration, especially if your dev team has no background in traditional coding.

After having read this, you might wonder why to go for a Mendix Native app at all? Well, it works on all devices, uses the React Native framework, and as such allows usage of everything inside the framework. Once published, your app will be very performant. You can make use of the full spectrum of device features, such as GPS, push notifications, etc. You will have superior control over the look and feel of your app, and the app can be built in such a way that it works excellently, even when it is offline. Finally, there is better security in Native apps.

Mendix PWA Pros and Cons

The major con of (Mendix) PWAs is that the apps cannot make use of the full spectrum of device features that hybrid apps could. One example is push notifications, which are currently not supported for iOS PWAs. Hence, it is essential to consider the requirements of the app before choosing to go for PWA, especially since interfacing with device features is limited. For a full overview of supported features, take a look at this page.

A second limitation is that Mendix PWA technology is still relatively new, meaning that there are some hurdles to take. We ran into an example recently while trying to interface with other online resources. A PWA is essentially an installed website, running in a browser that is limited to a single page. If you install it from Chrome, then Chrome will be used to run the app. Navigating to other pages is blocked, as the web navigation bar is hidden. Now imagine you want to use SSO using Microsoft OAuth 2.0, in which you need to be redirected to another web page. Yes, this can be done, but it turned out to be an interesting challenge. What this shows is not so much that the technology isn’t viable, but that time is required to smooth out some wrinkles.

As for the benefits of Mendix PWA technology, the major pro lies in the fact that it is web-based, meaning older hybrid or web apps are likely to require little work to upgrade to PWA. In some cases, it could be as simple as ticking a single checkbox. All pictures and storable resources are stored within the installed app, making a PWA much faster than a web page. Most importantly, Mendix PWAs do not require publishing to any app store and can be directly installed from the website. The only downside to this is that users may not be familiar with this paradigm.

My personal belief is that this superior user experience will be decisive in the future battle of Native vs PWA. Why go to the trouble of navigating to an app store, being forced to use its limited searching ability to find the app you need, then install it, and only then use it, when it could be as simple as a simple click. Take a look at the beauty of how simple it can be right below.

A glimpse into how easy it is to install a PWA

For a side-by-side comparison of the architectural pros and cons, I found this website to be very instructive.

Concluding: Choosing the Right Technology

The main takeaway from having taken a look at some pros and cons of either technology is that it is essential to consider precisely the requirements for the application you are (re)designing. If the main requirement is to access or write data, which in my experience is what a lot of Mendix apps do, then it is likely that PWA is a proper fit. If you want to quickly and cheaply convert a basic hybrid app, PWA might be the easiest way to go as well. However, If you need to make use of a wide array of device features, or if you want to have full control of security, then you will likely have to venture into Native tech. In general, Native apps are more costly than PWAs, so this comparison is best made before the development work is started.

Are you interested in learning even more about this topic? Feel free to reach out at any time at wouter.penris@capgemini.com

#About: Wouter Penris
Wouter is a lead Mendix Software Engineer at Capgemini. He has a background in education (English & Music) and in music (Jazz Vocals & piano); a multi-potentialite. Whereas a teacher spent years perfecting the art of instructing his students as simply and understandably as possible, he now immensely enjoys using this same skill to build high-tech products with an intuitive and easily-understandably Ux. He is a highly-creative problem-solver, and he blends research, technology, and aesthetics into actual business value and advice.

--

--