76
Progressive Web Apps & Polymer Wendy Ginsberg Product Manager, Google @wmginsberg

Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

Progressive Web Apps & Polymer

Wendy GinsbergProduct Manager, Google@wmginsberg

Page 2: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

Who am I?Wendy Ginsberg

Chrome Web Platform

Page 3: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

Who are you???????

???????????????????

Page 4: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

1. Polymer2. PWAs3. Polymer + PWAs

Page 5: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

1. Polymer

Page 6: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

Polymer ==

· “An opinionated library · that sugars Web Components APIs, to make it easy to build encapsulated, reusable custom elements.”

Page 7: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

Polymer library App Toolbox

Page 8: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

Polymer library App Toolbox

Polymer CLI Web Component Tester

Page 9: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

What problems are we solving?

Page 10: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam
Page 11: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

<h1><ul><p>

Page 12: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

http://drbl.in/esYL

Building UI tabsshould be easy!

Page 13: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam
Page 14: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam
Page 15: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam
Page 16: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam
Page 17: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam
Page 18: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

NOT INTEROPERABLE

Page 19: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

How can we redesign HTMLfor the (modern mobile) web?

Page 20: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam
Page 21: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

<search-input>

<search-icon>

<paper-fab>

<drawer-panel>

Page 22: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

Build a better framework.

Page 23: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

Build a better framework web.

Page 24: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

That sounds hard.

Where do we start?

Page 25: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

The web platform is already incredibly powerful.

Page 26: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

A study in <select>

Page 27: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

<select></select>

Simple

Page 28: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

<select><option>Nylon</option>

<option>Teflon</option><option>Styrofoam</option>

<option>Lycra</option></select>

Composable

Page 29: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

<select><option disabled>Nylon</option>

<option selected>Teflon</option><option disabled>Styrofoam</option>

<option disabled>Lycra</option></select>

Declarative

Page 30: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

<select multiple><optgroup label=“Clothing”>

<option>Nylon</option><option>Lycra</option>

</optgroup>…

</select>

Flexible

Page 31: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

<select><option>Nylon</option>

<option>Teflon</option><p>Propylene?</p><option>Styrofoam</option>

<option>Lycra</option></select>

Forgiving

Page 32: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

<label for=“polymer-picker”>Pick a Polymer</label><select id=“polymer-picker”>

<option>Nylon</option> <option>Teflon</option>

<option>Styrofoam</option> <option>Lycra</option></select>

AccessiblePick a Polymer

Page 33: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

> this.selectedIndex;> 0> this.addEventListener(‘change’, function() {> console.log(“I changed!”);> });

Programmable

Page 34: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

declarative, readable

encapsulated behavior

reusable across contexts

<select>an amazing little element

<select><option>Nylon</option>

<option>Teflon</option><option>Styrofoam</option>

<option>Lycra</option></select>

Page 35: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

I want more elements like this.

Page 36: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

I want to build elements like this.

Page 37: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

You can...with Web Components!

Page 38: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

Polymer ==

· “An opinionated library · that sugars Web Components APIs, to make it easy to build encapsulated, reusable custom elements.”

Page 39: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

<paper-tabs> <paper-tab>KNOWLEDGE</paper-tab> <paper-tab>HISTORY</paper-tab> <paper-tab>FOOD</paper-tab></paper-tabs>

Less markup. Less JS. Less confusion.

Web Components + Polymer

Page 40: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

2. PWAsProgressive Web Apps

Page 41: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam
Page 42: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam
Page 43: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam
Page 44: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam
Page 45: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

Case Study

2X increasein page visits per session

104% increase in conversion rate for new users

AliExpress

https://developers.google.com/web/showcase/

Page 46: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

Konga & JumiaCase Study

Loads 2x faster than their previous web site

Uses 6x less datathan their native app counterparts

https://developers.google.com/web/showcase/

Page 47: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

How did they do it?

Page 48: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

How did they do it? PWAs

Page 50: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

Reliable

What?Load instantly, regardless of network connection

Why? Send less data for initial page loads, save your users money

How? Service Workers

Page 51: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam
Page 52: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam
Page 53: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

Fast

What?No janky scrolling or slow to respond interfaces.

Why? 53% of users will abandon a site if it takes longer than 3 seconds to load!

How? PRPL pattern(Push, Render, Pre-cache, Lazy load)

Page 54: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

Push using HTTP2/pushRender only the critical route or bundlePre-cache the necessary files with a Service WorkerLazy load your content

https://www.flickr.com/photos/zionfiction/8104584002

Page 55: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

https://www.youtube.com/watch?v=6m_E-mC0y3Yhttps://www.flickr.com/photos/zionfiction/8104584002

Page 56: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

Engaging

What?Live anywhere an app can, send notifications to the user

Why? Increase transactions and interactions with your app

How? Web Push Notifications API, Add to Home screen

Page 57: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam
Page 58: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam
Page 59: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam
Page 61: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

We’re here to help!developers.google.com/web

Page 63: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

Here’s a head starthttps://www.polymer-project.org/1.0/toolbox/

Page 64: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

3. Polymer + PWAswith the Polymer App Toolbox

Page 65: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

Templates Layout Localization

Routing App Storage Service Worker

PolymerApp Toolbox

Page 66: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

PolymerApp Toolbox

Templates Layout Localization

Routing App Storage Service Worker

Page 67: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam
Page 68: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam
Page 69: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam
Page 70: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam
Page 72: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

How can I evaluate my PWA?https://developers.google.com/web/tools/lighthouse/

Page 73: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam
Page 75: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

1. Polymer2. PWAs3. Polymer + PWAs

Page 76: Progressive Web Apps & Polymer - Jfokus... Nylon Teflon Styrofoam

Thank you! Wendy Ginsberg@wmginsberg

Matterhorn CC0 https://goo.gl/VvIJCC