/pwa-talk

Presentation at WebDevCon 2017 in Berlin

Primary LanguageJavaScript

Are Progressive Web Apps the Future of Web Development?

This talk is available on my website: https://oren.github.io


What are PWAs

(the developer's version)

  • Native-level experience.
  • Performance & responsiveness.
  • Single codebase.
  • Multiple devices, desktop and mobile.

What are PWAs

(the product manager version)

A way to improve the following:

  • Conversion rate
  • Page visits
  • User time spent on app
  • Quicker time to market
  • Business model freedom
  • App discovery
  • App installation fatigue
  • App loyalty
  • App reach

https://cloudfour.com/thinks/the-business-case-for-progressive-web-apps/


Not Everyone Lives in a Wealthy Nation


Apple

(Takes 30% of your sales)


Show Case 1 - AliExpress


Show Case 2 - Twitter


Show Case 3 - UBER


How to Achieve a Native-like Experience?

  • Available offline/weak network using Service Worker.
  • Measure peformance with the tool Lighthouse.
  • Icon on home screen.
  • (Android/Mozilla/IE) App-like 'loading' page, no URL, push notification and more.

The PRPL Pattern

https://developers.google.com/web/fundamentals/performance/prpl-pattern/

  • Precache
  • Render initial route
  • Push server
  • Lazy-load

Preact

React on steroids - 3k, similar API


Preact - Performance

https://developit.github.io/preact-perf


What does Webpack do for us?


What does Babel do for us?

Converts ES2015 syntax to ES5 so my browser will be able to render the JavaScript. Things like import, let, require, arrow function, and also converts jsx to JavaScript.


CSS in Javascript


CSS Modules


Preact CLI

npm i -g preact-cli
preact create app
cd app
preact watch

Preact - Baked in PRPL

  • Precache: The service worker is configured for offline use.
  • Render initial route: use a tool called prerender.
  • HTTP2/Push Server: preact serve creates a simple HTTP2 server.
  • Lazy-Load: Automatic code-splitting for routes and shared "chunks" are optimized for reuse. Navigating from /about to /contact will dynamically (or "lazily") load the "contact" bundle and any associated chunks. This is all thanks to webpack.

Lighthouse


Resources