Service workers run on a background thread and can be used to cache and render web pages. This ability to offload client-side rendering tasks means progressive web applications make heavy JavaScript frameworks like Angular and React obsolete.

There seems to be a lot of confusion around what a progressive web application is in comparison to a native application, which is very understandable. The answer is not much and a lot.

You might be more surprised to learn there is a lot of confusion of how a progressive web app related to a regular website or web app. I feel this sentiment when business stakeholders express confusion. I get as much if not more questions about this from developers and IT support folks.

To take it a step further many question how service workers work with popular fast food JavaScript frameworks like React, Angular, Vue, etc.

The simple answer is service workers are decoupled, just like the server stack from these frameworks. The more accurate answer is service workers make the slow frameworks obsolete.

I think the problem lies in pre-existing knowledge of how a website should work. Because the technical folks have been working with the web for a while with different servers, content management systems and other platforms, not to mention today’s popular fast food JavaScript frameworks, they limit scope to these legacy architectures.

This makes it more difficult for them to grasp how a progressive web app can and does work.

What the service worker brings to your application is the ability to offload and scale content rendering from the UI and server. It frees your website from the handcuffs of heavy frameworks tying up the UI thread and frustrating your users.

It also allows you to reduce the demand on the server because the service worker can be used to customize content before it is returned to the browser’s UI thread for final rendering.

Its time we break this trend so more businesses can feel comfortable upgrading to PWAs and using them to improve their online presence. This applies to both consumer/customer oriented cotent as well as business applications.

My Personal Epiphany About PWAs Killing Single Page Applications

I tell this story often to clients and fellow developers, the moment I knew the classic web had reached a great pivot point to progressive web applications.

It was also the point I realized single page applications were dead men walking. With the client-side rendering being replaced by the service worker.

Basically, the service worker makes today’s popular fast food frameworks (Angular, React, Vue, etc) obsolete.

This is a good thing!

In May 2015 I gave a presentation at the O’Reilly Velocity conference in Santa Clara on designing high performance single page applications. The gist of the talk was to show how to minimize the impact JavaScript has throughout the application’s life cycle and eliminate common sources of excess network traffic.

The real key to that experience was the session before mine, given by Patrick Meenan, on service workers. You see this was one of the first presentations on service workers, ever.

As I sat in the audience, knowing I would follow him on stage, I could not help but realize everything I was about to cover was now a polyfil.

If you are wondering what a polyfil is, don’t worry. They are JavaScript libraries you can load to backfill support for modern features when a visitor is using an obsolete browser.

Today, the techniques I covered around those single page applications are supported across just about every browser and supported well, even iOS Safari, using a service worker.

To understand why I take this position you need to understand classic server-side rendering, single page application rendering and how a progressive web app with a service worker changes or better yet improves the rendering process.

#javascript #pwa #programming

Progressive Web Applications (PWA) Obsolete JavaScript Frameworks
1.40 GEEK