Monday, March 4, 2019

Progressive Enhancement and PWAs: A Conversation with Microsoft’s Aaron Gustafson

When I think about the reasons that Progressive Web Apps are so powerful, the first thing that typically comes to mind is the underlying tech–specifically the service worker. It’s one of the technical requirements that differentiates a PWA from any other responsive web page, and it powers some pretty compelling user experience elements (like offline use, super-fast load speeds, etc.). When I spoke with Microsoft’s Aaron Gustafson, he gave me one of the best rundowns of why service workers matter that I’d ever been given–which is why I’m so excited to share a bit of our conversation with you today!

Lumavate’s VP of Marketing, Stephanie Cox: I know you’re really big on and kind of known for is this idea of progressive enhancement. Can you explain a bit about what exactly you mean by that term?

Microsoft’s Aaron Gustafson: Ultimately it’s about creating experiences that are available and accessible to anyone no matter what device they happen to be on. It really brings together a lot of the things that we as an industry have been talking about over the last 15 or 20 years, which is accessibility and inclusive design–what actually can work for everyone. And really, it was about turning the tables on this idea of graceful degradation, which is where you built the latest and greatest browsers, and then you just assume that anybody who didn’t have those browsers was negative about the experience. It’s like if you built a flashlight and you had no fallback for the users who didn’t have flash, or you block somebody from being able to access their bank account details because they weren’t on the browser that you tested on. So progressive enhancement is sort of a rejection of lazy developing, because it’s not about you as a developer, it’s about actually thinking about the real people that are accessing our content, and making sure that we provide good experiences.

SC: So thinking about progressive enhancement, how does that relate to another term we’ve heard a lot about lately–progressive web apps?

AG: So “progressive” being the first word of progressive web apps is actually a call out to progressive, because the idea is that they’re an enhancement of an existing website. So whatever your website is, whether it’s a blog or a magazine or an actual piece of software as a service or something like that, is effectively the baseline experience, which you’re having on any website. PWAs enhance that baseline web experience–the first way is making sure it’s a secure site. The second thing is by having a web manifest, and then the third piece is using a service worker to provide an offline experience. But all of those pieces can enhance that baseline web experience, making it “progressive”.

SC: I know you just mention the three key technical components of a PWA, so which of them are you most excited about?

AG: The opportunities that are available to us with service worker are pretty impressive. It’s a self-contained script that is basically your own “man in the middle” to let you control all network requests. Anything that’s being requested from your site, you can intercept that request and do something with it. And the other piece of that is it has access to the cache site. In a traditional browser world, as a developer you didn’t really have much control over your browser your users’ browsers. But with service worker, we actually have this very low level API that lets us control what’s being put into the cache and what is being pulled out of the cache.

SC: So if someone comes to you and says they’re creating their first PWA, what advice are you going to give them, or what direction do you point them in?

AG: I think a really easy onramp is PWABuilder, which Jeff Burtoft is heading up. It’s sort of a system for helping you get started really easily. Another recommendation would be Jeremy Keith’s book “Going Offline”. It’s tremendously useful when it comes to understanding how service workers work.

Mobile Conversations are excerpts from Lumavate’s Mobile Matters podcast. You can listen to their full conversation here, and find more episodes with other mobile experts here.