progressive web apps are the future · angular js addict since 2011 web consultant / trainer @...

20
Progressive Web Apps are the future @AlainChautard - angulartraining.com

Upload: others

Post on 20-May-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Progressive Web Apps are the future · Angular JS addict since 2011 Web consultant / trainer @ angulartraining.com Organizer of the Sacramento Angular Meetup group / GDG Sacramento

Progressive Web Apps are the future @AlainChautard - angulartraining.com

Page 2: Progressive Web Apps are the future · Angular JS addict since 2011 Web consultant / trainer @ angulartraining.com Organizer of the Sacramento Angular Meetup group / GDG Sacramento

About me - Alain Chautard (or just Al)

Google Developer Expert in Web technologies

/ Angular / Google Maps

Angular JS addict since 2011

Web consultant / trainer @ angulartraining.com

Organizer of the Sacramento Angular Meetup group / GDG Sacramento

Page 3: Progressive Web Apps are the future · Angular JS addict since 2011 Web consultant / trainer @ angulartraining.com Organizer of the Sacramento Angular Meetup group / GDG Sacramento

Quick Poll

● Anybody ever heard about progressive web apps?

● What about responsive web apps?

● Has anyone done a Google (or other search engine) search over

the past 24 hours? ● Has anyone been to an app store (Google Play or Apple)?

Page 4: Progressive Web Apps are the future · Angular JS addict since 2011 Web consultant / trainer @ angulartraining.com Organizer of the Sacramento Angular Meetup group / GDG Sacramento

What are Progressive Web Apps?

Page 5: Progressive Web Apps are the future · Angular JS addict since 2011 Web consultant / trainer @ angulartraining.com Organizer of the Sacramento Angular Meetup group / GDG Sacramento

What are Progressive Web Apps (PWAs)?

● A way to have one code base instead of three

○ No more native apps for Android and IOs, only web!

● A way to have friction-less installs on mobile devices

○ No app store needed, no heavy download

● Overall, it's win-win all over the place!

Page 6: Progressive Web Apps are the future · Angular JS addict since 2011 Web consultant / trainer @ angulartraining.com Organizer of the Sacramento Angular Meetup group / GDG Sacramento

Do PWAs actually exist?

Yes! Many companies have

already adopted

Progressive Web Apps.

Example:

https://app.starbucks.com

Demo: http://bit.ly/at-pwa-

demo

Page 7: Progressive Web Apps are the future · Angular JS addict since 2011 Web consultant / trainer @ angulartraining.com Organizer of the Sacramento Angular Meetup group / GDG Sacramento

Characteristics of Progressive Web Apps

● A PWA is a web app: HTML + javascript + CSS

● PWA will prompt the user to get "installed"

● Once installed, PWA shows up on the home screen of your phone

● PWA loads with a splash-screen ● PWA can load full-screen (no browser window)

Page 8: Progressive Web Apps are the future · Angular JS addict since 2011 Web consultant / trainer @ angulartraining.com Organizer of the Sacramento Angular Meetup group / GDG Sacramento

And there's more...

● PWAs are meant to behave like native applications

● PWAs can do notifications

● PWAs can work offline!

● PWAs can be “uninstalled”

Page 9: Progressive Web Apps are the future · Angular JS addict since 2011 Web consultant / trainer @ angulartraining.com Organizer of the Sacramento Angular Meetup group / GDG Sacramento

How to make a Progressive Web App?

Page 10: Progressive Web Apps are the future · Angular JS addict since 2011 Web consultant / trainer @ angulartraining.com Organizer of the Sacramento Angular Meetup group / GDG Sacramento

How do I build a PWA?

● PWAs rely on two technologies:

○ A manifest file (manifest.json) that defines an icon, app name,

splash screen, etc. for both the native behavior and look & feel of

the application

○ A service worker that caches code (HTML, JS, CSS, images) for

offline use of the app, as well as notifications

● PWAs require HTTPS - you do need a certificate

Page 11: Progressive Web Apps are the future · Angular JS addict since 2011 Web consultant / trainer @ angulartraining.com Organizer of the Sacramento Angular Meetup group / GDG Sacramento

Example of manifest.json

● Full example can be found at https://developer.mozilla.org/en-

US/docs/Web/Manifest

Page 12: Progressive Web Apps are the future · Angular JS addict since 2011 Web consultant / trainer @ angulartraining.com Organizer of the Sacramento Angular Meetup group / GDG Sacramento

How to generate a manifest.json file?

There are several online tools for that, for instance: https://app-manifest.firebaseapp.com/

Page 14: Progressive Web Apps are the future · Angular JS addict since 2011 Web consultant / trainer @ angulartraining.com Organizer of the Sacramento Angular Meetup group / GDG Sacramento

Workbox: A library to help write service workers

Page 15: Progressive Web Apps are the future · Angular JS addict since 2011 Web consultant / trainer @ angulartraining.com Organizer of the Sacramento Angular Meetup group / GDG Sacramento

Examples of notifications

Several examples can be generated here: https://tests.peter.sh/notification-generator/

Page 16: Progressive Web Apps are the future · Angular JS addict since 2011 Web consultant / trainer @ angulartraining.com Organizer of the Sacramento Angular Meetup group / GDG Sacramento

LightHouse

An automated tool to test

progressive web apps

LightHouse gives a score to

your apps and highlights

what can be improved

Page 17: Progressive Web Apps are the future · Angular JS addict since 2011 Web consultant / trainer @ angulartraining.com Organizer of the Sacramento Angular Meetup group / GDG Sacramento

Are Progressive Web Apps the future?

Page 18: Progressive Web Apps are the future · Angular JS addict since 2011 Web consultant / trainer @ angulartraining.com Organizer of the Sacramento Angular Meetup group / GDG Sacramento

PWAs are work in progress...

● Both technologies used by PWAs are about to become W3C

standards:

○ https://www.w3.org/TR/appmanifest

○ https://www.w3.org/TR/service-workers-1/

Page 19: Progressive Web Apps are the future · Angular JS addict since 2011 Web consultant / trainer @ angulartraining.com Organizer of the Sacramento Angular Meetup group / GDG Sacramento

But they are also very much in the present

● A few directories with many PWAs:

○ https://pwa-directory.appspot.com/

○ https://pwa.rocks/

Page 20: Progressive Web Apps are the future · Angular JS addict since 2011 Web consultant / trainer @ angulartraining.com Organizer of the Sacramento Angular Meetup group / GDG Sacramento

Thanks for your attention

Email: [email protected]

Twitter: @AlainChautard

https://blog.angulartraining.com

My free PWA video course (for

Angular):

angulartraining.teachable.com