Beginning Progressive Web App Development - Dennis Sheppard

Beginning Progressive Web App Development (eBook)

Creating a Native App Experience on the Web

(Autor)

eBook Download: PDF
2017 | 1st ed.
XV, 266 Seiten
Apress (Verlag)
978-1-4842-3090-9 (ISBN)
Systemvoraussetzungen
66,99 inkl. MwSt
  • Download sofort lieferbar
  • Zahlungsarten anzeigen
Build fast, reliable web applications using the latest web development technologies. This book provides step-by-step learning through the process of transforming a 'traditional' web app into a high-performing progressive web app, leveraging principles and lessons taught throughout the book. You will learn to improve the performance, reliability, reach, and user engagement of mobile web applications through the use of specific, practical examples.

Because most non-trivial web applications developed today use JavaScript frameworks, you will learn about the most popular frameworks offering a PWA right out of the box, including React, Preact, Vue.js, Angular, and Ionic. You also will learn which tools to enlist to measure your application's performance, such as Google's Lighthouse.

Beginning Progressive Web App Development includes best practices to make your app work even when an end user has a poor or no Internet connection, and to send notifications and reminders with the Notification and Push APIs to keep your users engaged. You will come away with an understanding of the technologies-application shells, server push technology, and caching-that will allow you to rapidly deliver content to your users.

As important as it is to provide mobile users with a great experience, the principles of PWAs are not limited to smartphones. Most of what you will learn in this book is directly applicable to web applications on all screen sizes. 

What You'll Learn

  • Achieve nearly instant loading times
  • Implement service workers to make your app load faster and work while users are offline
  • Keep users engaged with web notifications
  • Measure the performance and reach of your web applications
  • Transform your existing web app into a progressive web app
  • Create a progressive web app from scratch
  • Understand what building a truly fast web app entails with Google's PRPL pattern  

Who This Book Is For

Web developers with prior JavaScript experience



Dennis Sheppard is the VP of Technology at NextTier Education, a startup dedicated to helping students navigate the college selection process. Long before that, though, Dennis graduated from Louisiana Tech University with a computer science degree, and went on to develop and architect software for almost a dozen different industries. With over 10 years of professional software development experience, he has built his share of web applications, for both mobile and desktop. Because of that, Dennis strongly believes in the power of Progressive Web Apps to further help the tech world reach those who do not have access to the fastest networks and latest and greatest phones. He was born and raised in the deep south, but migrated to the suburbs of Chicago where he lives with his wife, a set of twins who are growing up way too fast, and an arthritic but playful golden retriever.


Build fast, reliable web applications using the latest web development technologies. This book provides step-by-step learning through the process of transforming a "e;traditional"e; web app into a high-performing progressive web app, leveraging principles and lessons taught throughout the book. You will learn to improve the performance, reliability, reach, and user engagement of mobile web applications through the use of specific, practical examples. Because most non-trivial web applications developed today use JavaScript frameworks, you will learn about the most popular frameworks offering a PWA right out of the box, including React, Preact, Vue.js, Angular, and Ionic. You also will learn which tools to enlist to measure your application's performance, such as Google's Lighthouse.Beginning Progressive Web App Development includes best practices to make your app work even when an end user has a poor or no Internet connection, and to send notifications and reminders with the Notification and Push APIs to keep your users engaged. You will come away with an understanding of the technologies-application shells, server push technology, and caching-that will allow you to rapidly deliver content to your users.As important as it is to provide mobile users with a great experience, the principles of PWAs are not limited to smartphones. Most of what you will learn in this book is directly applicable to web applications on all screen sizes. What You'll LearnAchieve nearly instant loading timesImplement service workers to make your app load faster and work while users are offlineKeep users engaged with web notificationsMeasure the performance and reach of your web applicationsTransform your existing web app into a progressive web appCreate a progressive web app from scratchUnderstand what building a truly fast web app entails with Google's PRPL pattern Who This Book Is For Web developers with prior JavaScript experience

Dennis Sheppard is the VP of Technology at NextTier Education, a startup dedicated to helping students navigate the college selection process. Long before that, though, Dennis graduated from Louisiana Tech University with a computer science degree, and went on to develop and architect software for almost a dozen different industries. With over 10 years of professional software development experience, he has built his share of web applications, for both mobile and desktop. Because of that, Dennis strongly believes in the power of Progressive Web Apps to further help the tech world reach those who do not have access to the fastest networks and latest and greatest phones. He was born and raised in the deep south, but migrated to the suburbs of Chicago where he lives with his wife, a set of twins who are growing up way too fast, and an arthritic but playful golden retriever.

Table of Contents 5
About the Author 11
About the Technical Reviewer 12
Acknowledgments 13
Part I: Intro to PWAs and Tooling 14
Chapter 1: Introduction to Progressive Web Apps 15
What a Progressive Web App Actually Is 17
Current and Future PWA Support 20
Looking Ahead 22
Chapter 2: Tools to Measure Progressive Web Apps 23
A Light to Keep You Off the Rocks 23
Chrome DevTools 27
Webpagetest.org 30
Looking Ahead 32
Part II: PWA Features 33
Chapter 3: Service Workers 34
Promises 36
Fetch 40
Service Workers 41
Register the Service Worker 42
Updating the Service Worker 49
Other DevTools Options 53
Browser Compatibility 54
Service Worker Recap 54
Looking Ahead 54
Chapter 4: Caching and Offline Functionality with  Service Workers 55
The fetch Event 55
The Cache API 57
Going Offline 63
Different Caching Strategies 66
Updating the Cache 71
sw-precache 73
sw-toolbox 75
Dynamic Page Caching 79
Looking Ahead 81
Chapter 5: Background Sync for Offline Apps with Service Workers 82
The Background Sync API 82
Registering for sync 82
Listening for sync 83
Implementation Details of Using sync 84
Testing for Offline Sync 89
Making Improvements 90
Data Storage 91
IndexedDB vs. localForage 91
Using localForage For Better Offline Support 95
The message Service Worker Event 99
Looking Ahead 102
Chapter 6: Adding your App to the Home Screen with Web App Manifest 103
Installing the App to the Home Screen 108
Handling Installation Events 108
Manually Adding the App to the Home Screen 109
The App Splash Screen 112
The display Property 114
The start_url Property 115
Looking Ahead 115
Chapter 7: Notifications 116
Web Notifications 118
Requesting Permission to Notify 118
Sending a Notification 120
Tagging Notifications 123
Web Notifications with Service Workers 123
Push Notifications 125
Subscribing a User to Push Notifications 126
Saving the PushSubscription Object 131
Triggering the Push Notification 135
Catching Push Events in the Service Worker 137
Testing Push on Mobile 140
Handling Notification Click Events 142
Looking Ahead 144
Chapter 8: App Shell Architecture and Loading Performance 145
What an App Shell Is 145
Caching the App Shell 149
Measuring App Shell Performance 151
Going Beyond the App Shell 152
Render Blocking Scripts 154
Async and Defer 155
Deferring Stylesheet Parsing and Execution 157
Preloading JavaScript and CSS and Other Resources 157
Looking Ahead 159
Chapter 9: Exploring HTTP/2 and Server Push 160
Head-of-Line Blocking 160
Header Compression 163
Introducing HTTP/2 164
Implementing HTTP/2 in Node.js 164
Server Push 167
Deploying HTTP/2 and Server Push 173
Measuring the Impact of HTTP/2 and Server Push 174
Looking Ahead 177
Part III: Putting the Features to Use 178
Chapter 10: Turning a Real App into a PWA 179
The Movies Finder App 179
The Plan to Make a PWA 184
Getting the Code and Running It 185
Setting Up sw-precache 186
Caching All the Things 190
Deploying to Firebase 193
Moving the Render-Blocking Stylesheet 197
Implementing Server Push 197
Adding the App Manifest 201
Thoughts on Movies Finder Performance 210
Looking Ahead 211
Chapter 11: PWAs From the Start 213
React PWA 214
Creating a React App 215
Configuring the Service Worker 217
Running and Building the React App 218
Deploying and Measuring Your React PWA 219
Summary of React’s PWA Effort 221
Preact PWA 221
Preact CLI 222
Running the Built-in Preact HTTP/2 Server 223
Preact CLI Plugins 224
Running Lighthouse on Firebase-Deployed Preact 225
Summary of Preact’s PWA Effort 227
Vue.js PWA 227
Vue CLI and PWA Creation 228
What the Deployed Vue PWA Offers 229
Running Lighthouse on Firebase-Deployed Vue 231
Summary of Vue’s PWA Effort 233
Angular PWA 233
Angular’s Rocky PWA Start 234
Building the Angular PWA 235
Running Lighthouse on Firebase-Deployed Angular 236
Summary of Angular’s PWA Offering 237
Ionic PWA 237
Installing Ionic 238
Enabling the Ionic Service Worker 240
Building Ionic 240
Deploying and Testing the Ionic PWA 241
Summary of Ionic’s PWA Offering 243
Starting a PWA from Scratch 244
Looking Ahead 244
Part IV: Leveling Up Your PWA 245
Chapter 12: Leveling Up Your PWA 246
Google’s PRPL Pattern 246
Lazy Loading 247
Code Splitting 247
Analyzing Bundles 249
Server-Side Rendering 252
Drawbacks to Server-Side Rendering 254
Resources to Implement Server-Side Rendering 254
Pre-Rendering 255
Web Workers 255
PWA News 259
Safari 259
Workbox 259
A Last Word 262
Index 263

Erscheint lt. Verlag 29.11.2017
Zusatzinfo XV, 266 p. 125 illus. in color.
Verlagsort Berkeley
Sprache englisch
Themenwelt Informatik Software Entwicklung Mobile- / App-Entwicklung
Mathematik / Informatik Informatik Web / Internet
Schlagworte angular and progressive web apps • Dennis Sheppard • Install to home screen • ionic • JavaScript • Mobile Web • preact and progressive web apps • progressive web app development • progressive web apps • Push Notifications • react and progressive web apps • service workers • vue.js and progressive web apps • Web caching • Web Development • Web performance
ISBN-10 1-4842-3090-6 / 1484230906
ISBN-13 978-1-4842-3090-9 / 9781484230909
Haben Sie eine Frage zum Produkt?
PDFPDF (Wasserzeichen)
Größe: 10,7 MB

DRM: Digitales Wasserzeichen
Dieses eBook enthält ein digitales Wasser­zeichen und ist damit für Sie persona­lisiert. Bei einer missbräuch­lichen Weiter­gabe des eBooks an Dritte ist eine Rück­ver­folgung an die Quelle möglich.

Dateiformat: PDF (Portable Document Format)
Mit einem festen Seiten­layout eignet sich die PDF besonders für Fach­bücher mit Spalten, Tabellen und Abbild­ungen. Eine PDF kann auf fast allen Geräten ange­zeigt werden, ist aber für kleine Displays (Smart­phone, eReader) nur einge­schränkt geeignet.

Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen dafür einen PDF-Viewer - z.B. den Adobe Reader oder Adobe Digital Editions.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen dafür einen PDF-Viewer - z.B. die kostenlose Adobe Digital Editions-App.

Zusätzliches Feature: Online Lesen
Dieses eBook können Sie zusätzlich zum Download auch online im Webbrowser lesen.

Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.

Mehr entdecken
aus dem Bereich
Build cross-platform JavaScript and TypeScript apps for the web, …

von Mikhail Sakhniuk; Adam Boduch

eBook Download (2024)
Packt Publishing (Verlag)
32,39
Robust and fast cross-platform application development

von Marco Cantù; Paweł Głowacki

eBook Download (2024)
Packt Publishing (Verlag)
33,59