TouchKit is now 100% PWA — so what?

Matti Tahvonen
Matti says about web apps…
3 min readJan 31, 2018

I had a discussion at work about PWAs and somehow got an inspiration to do some small enhancements to TouchKit for Vaadin 8. The 5.0.0 version is now available, and you can now easily build 100% PWA apps with it, but what really changed? Should you care?

I’m a big fan of mobile web apps. I have worked with mobile optimized apps/sites and also use them a lot. About the term (PWA aka progressive web apps) I’m not that excited. Many people and companies have started to use it generally for mobile web apps, which is quite far from the original idea of fading away from the border between websites and apps. Microsoft even puts PWAs into their app store channel instead. From the users perspective, PWA apps were already invented when Apple came out with iPhone, but now they are just built with Google-developed technology, with certain enhancements. Mobile web apps were here long before PWA and as an engineer, I’d much rather be more specific and be enthusiastic about certain technologies or emerging browser standards instead of a fuzzy marketing term meaning almost nothing.

But the marketing person in me says that PWA is the future and all apps should be PWA in 2018. Did you know that you can also detect how much PWA your application is? The Lighthouse plugin for Chrome will give your web page a PWA score ranging from 0–100%. And this score is now achieved easily by the TouchKit example application ;-)

So what exactly changed?

Not too much actually. Androids have been supporting the “Apple PWA” technologies (Cache manifest and meta tags for home screen web apps) for a while now and TouchKit applications have been as easy to add to your Androids start screen. But now Androids (technically Chrome browsers) get the same thing achieved with Service Worker and JSON format manifest. From users point of view everything (components, strong caching, offline mode etc) works the same as before.
But there is one new feature now on Android devices. Now that TouchKit apps are considered PWAs, Android automatically suggests users to install it to their home screen if specific usage heuristics raise up a flag. Previously developers used some scripts to detect whether the page was used inside a browser chrome or not and provided a hint about the application nature in the application UI itself. Now this is provided by the OS/browser.

More future proof

No matter what you think about the term PWA and how it is abused by the industry, it is a fact that JSON format manifest file will replace the meta tags invented by Apple in 2007 and the same for the service worker and the previous declarative strong caching mechanism. We don’t know when Google/Android/Chrome drops the support for the old Apple invented technologies, but it will happen at some point. Thus, the upgrade to TouchKit 5.0 will pump some extra lifespan to your mobile Vaadin application.

Also, especially the usage of service worker opens up some possibilities in the future for background processing and push notifications.

Missing a feature? Found a bug?

The 100% PWA compatibility was hacked together quite quickly so there sure may be missing features and some rough edges. As TouchKit nowadays lives as a community project, don’t expect me to get everything fixed with an SLA, but please join the effort via GitHub if you want something to be fixed.

Naturally, you can order our excellent consulting team to help you if you want some commercial support for your mobile Vaadin app.

--

--