Skip to Content

With Chrome 57, Progressive Web Apps (PWA) have been grown into a mainstream mobile web technology. The idea is simple and attractive – allow websites to be like the native ones, but without the need to install from the Play Store.

UI5 is the main front end technology at SAP and its partners, with stress on fast UI implementations for server-side applications. Now, after PWAs technology has arrived at production status, we need to answer a question: is UI5 compatible with PWA and can we build Progressive Web Apps with it today?

Introduction

Development of native mobile applications is expensive, requires special skills and special deployment processes. Most of Play Store applications are homogeneous, implement a single user story and usually have a purpose to achieve maximal possible target auditory.

That makes creation of mobile business applications a challenge for developers and managers, because a typical business process implementation consists of several highly specialized and customized applications with a predefined and limited number of users. Only limited number of business scenarios can justify the resulting price overhead of a single application per a user.

PWAs allow to overcome these limitations and to combine mobile and desktop development into a single process – using the same skills, tools, and deployment as well as support channels.

OpenUI5 and PWA

You can start building responsive UI5 PWA applications right now. PWA is not a special framework but a combination of existing Web technologies: Web App Manifest, responsive Web Apps, and service workers for offline persistence. Google Chrome combines all the three and integrates them into Android OS as a single concept. PWA is framework independent and works practically with any modern Web UI framework including OpenUI5.

To illustrate it, we have created a sample UI5 ToDo application. We will not go into technical details, you can find the source code and description in GitHub. In general, making a responsive Web application to a PWA is simple:

  1. Specify meta tags in the HTML header.
  2. Create and link a Web App Manifest.
  3. Create icons and a splash screen.
  4. Add a service worker.
  5. Check if it works.

It is a short list of simple and straightforward steps. A mobile application can be adapted as a PWA in a matter of minutes. When you open such am application on a mobile device, Google Chrome will propose to install it on the home screen, and, when installed, it will be indistinguishable from any other full screen native app.

There are some limitations though. Despite OpenUI5 did a good job switching to asynchronous loading of resources recently, it still loads messagebundle.properties files with standard UI texts synchronously. An OpenUI5 PWA application should replace standard UI texts for dialog buttons, input placeholders etc. with specific ones. The sap.ui.model.* library does not have any fail-and-retry smart handlers for application data, and a special logic is needed for request handling in offline situations.

Further considerations

PWA concept just opens the door for HTML apps into the mobile world. Our sample shows how to load and store the code on a device by request, but this alone does not make such an application 100% mobile until it is consequently built following the offline-first mindset. Still, there is a way to go and there is a lot to learn, but the perspective is very promising now.

 

Previous Post: UI5ers Buzz #12

 

Talk to you soon,

Sergej

Sergej is a Senior Developer working at SAP. His interest lies mainly in front end programming in various areas.

 

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

  1. Douglas Cezar

    Sergej, it’s really interesting, thank you for sharing!

     

    I’ve opened your demo on my Galaxy S7 Chrome v60 and the app didn’t ask anything related to be added to the initial screen. I’ve used the Chrome menu and added an initial screen icon. After that I could successfully launch the PWA from the initial screen even with my phone on offline/plane mode. Do you know why I wasn’t automatically asked to

    Do you know why I wasn’t automatically asked to create the icon? If it’s common maybe we should design a button or something like that on our apps to offer this option to the user.

    I’ve also finished some days ago to build an app that was meant to be used off-line , so I’ve used Apache Cordova to do so. I’ll work in transforming it to a PWA.

     

    Thank you for your time and effort sharing this,

    Douglas

    (0) 

Leave a Reply