Summary of PWA

Let's summarize the concepts we learned in the “Building a Weather App as a Progressive Web App (PWA)” chapter.

We'll cover the following

Wrap up!

We should now be able to convert a Blazor WebAssembly app into a PWA by adding a manifest file and a service worker.

In this chapter, we introduced PWAs. We explained how to convert a web app into a PWA by adding a manifest file and a service worker. We explained how to work with manifest files and service workers. We went into some detail explaining the different types of service workers and explained how to use the CacheStorage API to cache request/ response pairs. Finally, we demonstrated how to use both the Geolocation API and the OpenWeather API.

After that, we used the Empty Blazor App project template to create a new project.

We added a JavaScript function that uses the Geolocation API to obtain our coordinates. We added some models to capture the coordinates and used JS interop to invoke the JavaScript function. We used the OpenWeather One Call API to obtain the local 5-day weather forecast and we created a couple of Razor components to display it.

In the last part of the chapter, we converted the Blazor WebAssembly app into a PWA by adding an image, a manifest file, and an offline page service worker. Finally, we installed, ran, and uninstalled the PWA. We can apply our new skills to convert our existing web apps into PWAs that combine the benefits of a web app with the look and feel of a native app.

Get hands-on with 1400+ tech skills courses.