Building Progressive Web Apps by Tal Ater

If you follow me on twitter you probably know that I am all in on Progressive Web Apps. That's why I was so excited to hear Tal Ater was writing a book on the topic. Full disclosure Tal sent me an ebook version that I could read but don't tell him I was planning on purchasing it anyway.

I had really high expectations for the book as Tal is the author of some really great open source software like AnnYang for adding speech recognition to your site and UpUp for detecting when your site is off-line. I knew I wasn't going to be disappointed when the first chapter opened up with a Patrick Rothfuss quote from his amazing book The Name of the Wind.

This book is the definitive tome on Progressive Web Apps. Tal does a fantastic job of introducing the topic of Progressive Web Apps to readers who may be unfamiliar with PWA's. The book is structured so that you progressively add functionality to a fictional website The Gotham Imperial Hotel. It's super easy to follow along as all the code for the site is hosted on GitHub.

While taking the reader through enhancing the site you will learn some topics that I haven't seen well covered elsewhere like the Service Worker Lifecycle. Having a solid understanding of the service worker lifecycle will help you understand what caching strategy to use for various files in your app. Too frequently tutorials on PWA's only describe the cache only strategy but this book will introduce you to a number of caching strategies besides cache only like cache, falling back to network; network only; network, falling back to cache; cache, then network; etc.

Moving on from caching strategies one of the most powerful abilities of services workers is the ability to do Background Synchronization. Tal walks you through how to provide excellent offline support for your web app starting with saving data locally with IndexedDB, moving to adding Background Sync to your service worker and finally communication between the service worker and the app using post messages. Each one of these chapters flows naturally and when you are done you'll have a web application that is tolerant of network connectivity.

The rest of the book covers important topics like setting your your site to be recognized as a PWA using manifest.json and the always controversial topic of push notifications. Yes, PWA's can do push notifications but ask yourself, "Should I bother my users?" before sending any push message.

So, if you couldn't tell by the glowing review above I highly recommend you pick up this book if you want to learn more about Progressive Web Apps.

Building Progressive Web Apps by Tal Ater (Amazon affiliate link)