Progressive Web Applications

Every time there is a chance to build a mobile application with javascript, web developers are like “yeah, this is the way; the future of building mobile apps” and jump on the bandwagon of the saucy java intent avoidance.

[WHATEVER JS FRAMEWORK] will change the way we build mobile apps Every web developer ever

We’ve seen it with jQuery Mobile, Apache Cordova (Phonegap), Ionic, NativeScript and of course React Native.

How do progressive web apps fit into the picture?

What is it?

The fancy term was coined by Google where this technology originated. It sounds complex but progressive web apps are just web pages that use modern browser features – Web App Manifest, Service Workers and HTTPS. They are usually complemented with Cache Storage and IndexedDB.

They are linked with the browser and those technologies are currently experimental. At the moment you are mostly limited on Android platform as Safari doesn’t have a full support of service workers. You can check out the readiness of it at Is ServiceWorker Ready? site.

The web manifest is a simple file with a few information about your app – icon, name, description and others. When you add the site to your phone home screen this is the file where the icon comes from.

Service worker sits in between the browser and the server and is able to manage the network communication, work with the cache API and manage request when offline. It only works over HTTPS protocol.

Progressive web applications can mimic the material design of Android applications, but in the end you are in charge of your HTML and CSS. For that you could use Polymer or one of the native look emulating javascript libraries like Ionic.

Why would you want to use it?

Firstly, they won’t replace a mobile app. Or a website. They are a complement to them and are not faster to build or easier to maintain. They solve a different problem.

They help to overcome the barrier to install and launch apps. No need to go to the shop, search for the app, click install, agree on permissions and launch. You have them immediately in the browser and user can bookmark them to the home screen.

According to one of the Google presentations each step involved in installing an app has at least 20% drop out rate – meaning that with each click you lose 20% users. This is a huge! And for certain types of business like big e-shops, airlines or news it should be the reason to explore this area.

When using your cellphone your connection will be flaky and slow even if you don’t live in New Zealand. Removing that from the equation leads to better conversions and more sales on flaky networks. Users won’t leave your website because they’ve been staring at a blank screen for the past 3 minutes.

Apart from improving the speed of the app you also have the ability to work purely offline. That might be convenient for example for an airline app to show checked tickets.

Prosper Otemuyiwa did a nice write up of existing use cases and how they improved the business.

Where to learn more?

Conclusion

Building a progressive web application requires the same amount of effort as creating a mobile app. You can’t easily convert your website into an app without major changes to the architecture and most of the early adopters solves it by creating and serving a mobile version different to the desktop one.

You shouldn’t think of it as a replacement for a mobile app, but as a complement to your website that will help with customer engagement, conversions on flaky networks and remove the barrier to install on the phone.

It is not a faster and cheaper way to develop mobile apps but it provides another way to support your business and generate more money.

Comments

Sintaxi: As one of the inventors of Cordova/PhoneGap allow me to set the record straight. We never intended for anyone to think PG was anything more than a temporary measure. Hence the mantra: “the ultimate purpose of PhoneGap is to cease to exist” –Brian LeRoux.

If anything this article should be acknowledging the role Cordova/PG served as a conceptual if not functional proof of concept for progressive web apps.

Jakub: You guys did a hell of a good job with Phonegap though. I think it is a wonderful piece of technology and it still has a great number of use cases.

People like to think about these as silver bullets to mobile development which I dont think exists.


Would you like to get the most interesting content about programming every Monday?
Sign up to Programming Digest and stay up to date!