Mobile Landscape ● Mobile traffic surpassed desktop traffic ● Mobile phone internet user penetration worldwide is at 52.7% (in US, at 75.1%) ● App usage dominates browser usage in mobile landscape (90% of the time spent in apps)
● The best of the web and the best of apps ● No install required ● Loads quickly, sends relevant push notifications, has an icon on the home screen, and loads as a top-level, full screen experience PWA in a nutshell
PWA Characteristics ● Connectivity independent (offline first + cache via SW) ● Re-engageable (engage users through PN) ● Installable (install to device’s home screen) ● Fresh (always get the latest data) ● Secure (always served via HTTPS)
PWA Characteristics ● Low friction (just use it) ● Just web (HTML/CSS/JS) ● Fast (keep the experience smooth) ● Instant loading (SW FTW!) ● Shiny future (more things to come)
What is the App Shell? ● The app's shell is the minimal HTML, CSS, and JavaScript that is required to power the user interface of a progressive web app. ● Separates the core application infrastructure and UI from the data ● After the first load, the app shell related resources are cached via SW to local device
Design the App Shell ● What needs to be on screen immediately? ● What other UI components are key to our app? ● What supporting resources are needed for the app shell? (e.g: images, JS, styles, etc.)
● A script that your browser runs in the background ● It includes features like push notifications and background sync ● The ability to intercept network requests + managing a cache of responses SW in a nutshell
SW summary ● Works on HTTPS only (avoid man in the middle attacks) ● Allows you to manipulate cache (via multiple strategies) ● Runs in background, in a separate thread ● Doesn’t have access to DOM ● Doesn’t control origin page on first load ● Only one SW active at a single time
Web App Manifest in a nutshell ● Simple JSON file ● Control how your app appears to the user, direct what the user can launch, and define its appearance at launch
Push Notifications in a nutshell ● Web Push Notifications allow users to opt-in to timely updates from sites they love and allow you to effectively re-engage them with customized, relevant content ● Push is invoked when a server supplies information to a SW ● A notification is the action of a SW or web page script showing information to a user
Conclusions ● The web is definitely closer to mobile (they can compete) ● We have advancements in the platform itself (SW, HTTP/2) and in the tools we use to build apps ● We have come up with new strategies and new architectures (App Shell, PRPL) ● More ideas yet to try but, for web apps, the future is already here!