SlideShare a Scribd company logo
1 of 66
Download to read offline
Progressive Web
Apps
What, why and how
rizafahmi.com
Progressive Web
Apps
What is
We already Did it!
Believe it or not
Responsive, mobile first layout Cache, Localstorage, etc.
HTML5 is a new hotness
2009
HTML5
HTML5
2009 2012
Facebook
Hybrid App
HTML5 is a new hotness
HTML5 is a new Notness
HTML5 is a new Notness
"The biggest mistake we made as a
company was be!ng too much on HTML5
as opposed to na"ve.”
This guy
From Facebook
Native Apps Rules
HTML5
20122009
Facebook
Hybrid App
Mobile apps rules!
Native
Advantages
✓ Great performance
✓ Smooth anima!ons & interac!ons
✓ Instant loading & offline support
✓ Easy access through home screen
x Distribu=on problems
x Upda=ng is a pain
x Extra care with low memory phone
x Applica=on size
Native
disadvantages
Web StrikeS Back!
HTML5
20122009
Facebook
Hybrid App
Mobile apps rules!
2016
Web strikes back
Best of Both Worlds
Progressive Web Apps
What Progressive Web Apps Is
Engaging
App-like Linkable
Reliable Fast
Secure
Case Studies
63% 

users on 2G
70% 

increase on conversion
Case Studies
75% 

increase in Tweet Sent
65% 

increase in pages per session
20% 

decrease in bounce rate
Case Studies
104% 

higher conversion rate
2x

page visit
74% 
increase "me spent
Tech BehindProgressive Web Apps
Service Woker App Manifest
How ToProgressive Web Apps
Our Project✓ Single page app for local meetup videos
✓ Offline support via browser caches
✓ Modern, ES6 JavaScript syntax, no framework
✓ Mul"pla$orm, Android and iOS
✓ Na"ve app look & feel
✓ Fullscreen app
✓ Splash screen
✓ Home screen icon
Engineers.id
Our Plan✓ Design App Shell
✓ Ge!ng The Data from API
✓ Using Service Worker:
✓ Caching App Shell
✓ Caching Data
Engineers.id
✓ Na"ve-like apps:
✓ Standalone app
✓ Adding App Icons
✓ Adding Splas Screen
✓ Deploy and securing our
app
Tools
Chrome DevTools - Device Mode
✓Simulate device web experiences
✓Responsive breakpoint visualiza"on
✓First meaningful paint, metrics, etc
✓Service worker, manifest, etc
Tools
iOS Simulator
✓localhost is your machine
✓Cri"cal for tes"ng apple-specific features
✓Connect to desktop’s safari for debugging
Tools
Android Emulator
✓10.0.2.2 is your machine
✓Connect to desktop’s chrome for debugging
Tools
Lighthouse
✓Chrome extension or CLI
✓Checklist for our progressive enhancements
✓Performance sugges"ons
Designing The App Shell
Content
Applica"on Shell
Step 1
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie-edge">
<meta name="description" content="Best video resources for learn programming">
<link rel="stylesheet" href=“styles/main.css" type="text/css" media="screen"
charset="utf-8">
<link rel="stylesheet" href="styles/spinner.css" type="text/css" media="screen"
charset="utf-8">
<title>Engieers.id
</title>

</head>
<body>
<nav>
<div class="left">
<a href="/">
<h1>Engineers.id
</h1>

</a>

</div>
<div class="right">
<button onclick="location.reload()" class="btn card__btn">Refresh
</button>

</div>

</nav>
<div class=“spinner”>

...
</div>
<ul class="cards">

</ul>
<script id="card" type="text/template">
<li class="cards__item">

</li>

</script>

</body>
Test it out!
Get The Data
Step 2

// scripts/app.js
const url = 'https:
//engineers-id-backend-
ybbwzovhnl.now.sh/api/videos'
fetch(url)
.then(response 
=> response.json())
.then(json 
=> {
appendData(json)
})
Test it out!
fetch Polyfill



<!-- index.html 

-->
<html>
<head>

...
</head>
<body>



<!-- 

... 

-->
<script src="scripts/vendors/fetch.js">
</script>
<script src="scripts/app.js">
</script>

</body>

</html>
Test it out!
Zoom it out!
Naviga"on begins

(17ms)
First conten$ul paint
(600ms)
First meaningful paint
(1.58s)
Time to interac"ve
(1.8s)
Service Worker
Not really a new
technology
Parallel, not just
concurrent
Independent script
Sends message to
origin
Register Service Worker
Step 3

// scripts/app.js
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('./service-
worker.js').then(function () {
console.log('Service Worker Registered')
})
}
Test it out!
Test it out!
Cache The App Shell
Step 4

// service-worker.js
var cacheName = ‘engineers-id’
var filesToCache = [
'/',
'/index.html',
'/scripts/app.js',
‘/styles/main.css',
'/styles/spinner.css',
‘/images/logo.svg',

// 

...
]
self.addEventListener('install', function (e) {
e.waitUntil(
caches.open(cacheName).then(function (cache) {
return cache.addAll(filesToCache)
})
)
})
Cache The App Shell
Step 4
Wait, How Service Worker actually work?!
Service worker
Installing Ac"vated
Error
Idle Push
Fetch
Terminated
Web page
Caching
App Shell
Cache The Content
Step 5
Caching Strategy - Cache Only

//service-worker.js
self.addEventListener('fetch', function (event) {

// If a match isn't found in the cache, the response

// will look like a connection error
event.respondWith(caches.match(event.request))
})
Caching Strategy - Network Only
self.addEventListener('fetch', function (event) {
event.respondWith(fetch(event.request))

// or simply don't call event.respondWith, which

// will result in default browser behaviour
})
Caching Strategy - Cache, failing back to network

//service-worker.js
self.addEventListener('fetch', function (event) {
event.respondWith(
caches.match(event.request).then(function (response) {
return response 
|| fetch(event.request)
})
)
})
Caching Strategy - Cache, NetworK Race

// service-worker.js
function promiseAny (promises) {
return new Promise((resolve, reject) 
=> {
promises = promises.map(p 
=> Promise.resolve(p))
promises.forEach(p 
=> p.then(resolve))
promises
.reduce((a, b) 
=> a.catch(() 
=> b))
.catch(() 
=> reject(Error('All failed')))
})
}
self.addEventListener('fetch', function (event) {
event.respondWith(
promiseAny([caches.match(event.request), fetch(event.request)])
)
})
Caching Strategy - Cache Then Network

// service-worker.js
self.addEventListener('fetch', function (event) {
event.respondWith(
caches.open('mysite-dynamic').then(function (cache) {
return fetch(event.request).then(function (response) {
cache.put(event.request, response.clone())
return response
})
})
)
})
Caching Strategy - Network Falling Back To Cache
self.addEventListener('fetch', function (event) {
event.respondWith(
fetch(event.request).catch(function () {
return caches.match(event.request)
})
)
})
Cache The Content
Step 5

// service-worker.js
self.addEventListener('fetch', e 
=> {
e.respondWith(
caches.open(dataCacheName).then(cache 
=> {
return fetch(e.request)
.then(networkResponse 
=> {
cache.put(e.request, networkResponse.clone())
return networkResponse
})
.catch(() 
=> {
return caches.match(e.request)
})
})
)
})
When Our Users Going Rogue...
Recap
App Manifest
App Manifest
// manifest.json
{
"name": "Engineers.id",
"short_name": "eng.id",
"lang": "en-US",
"start_url": "/index.html",
"display": "standalone",
"theme_color": "#fff",
"icons": [
{
"src": "images/icons/icon-128x128.png",
"sizes": "128x128",
"type": "image/png"
},


...
],
"background_color": “#fff”,
“orientation”: “portrait”
}
App Manifest - Display Mode
‘fullscreen’
‘standalone’
‘minimal-ui’
‘browser’
App Manifest - Icons
144px by 144px
128px by 128px
192px by 192px
256px by 256px
512px by 512px
App Manifest - Home Screen Icons
48 dp icons for
home screen and task switcher
144px by 144px
192px by 192px
48px by 48px
96px by96px
App Manifest - Splash Screen Icons
128 dp icons for
splash screen
128px by 128px
256px by 256px
512px by 512px
{
"name": "Engineers.id",
"short_name": "eng.id",
"lang": "en-US",
"start_url": "/index.html",
"display": "standalone",
"theme_color": "#fff",
"icons": 
[],
"background_color": “#fff”,
“orientation”: “portrait”
}
App Manifest



<!-- index.html 

-->
<link rel="manifest" href="manifest.json">
Install Banners
{
"name": "Engineers.id",
"short_name": "eng.id",
"lang": "en-US",
"start_url": "/index.html",
"display": "standalone",
"theme_color": "#fff",
"icons": [


...
{
"src": "images/icons/icon-144x144.png",
"sizes": "144x144",
"type": "image/png"
},
],
"background_color": “#fff”,
“orientation”: “portrait”
}
Test It Out!
61
Test It Out!
62
One last thing: Deploy h%ps://zeit.co/now
Recap!
More.. More..
PaymentPush No"fica"on Connect to Hardware
THOUGHTS??!
facebook.com/rizafahmi
twi%er.com/rizafahmi22 linkedin.com/in/rizafahmi
github.com/rizafahmi
slideshare.com/rizafahmi
hack"v8.comrizafahmi.com

More Related Content

What's hot

Alex Pshul: What We Learned by Testing Execution of 300K Messages/Min in a Se...
Alex Pshul: What We Learned by Testing Execution of 300K Messages/Min in a Se...Alex Pshul: What We Learned by Testing Execution of 300K Messages/Min in a Se...
Alex Pshul: What We Learned by Testing Execution of 300K Messages/Min in a Se...CodeValue
 
Real World Progressive Web Apps (Building Flipkart Lite)
Real World Progressive Web Apps (Building Flipkart Lite)Real World Progressive Web Apps (Building Flipkart Lite)
Real World Progressive Web Apps (Building Flipkart Lite)Abhinav Rastogi
 
Service workers your applications never felt so good
Service workers   your applications never felt so goodService workers   your applications never felt so good
Service workers your applications never felt so goodChris Love
 
Using Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the WebUsing Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the Webphilogb
 
We come in peace hybrid development with web assembly - Maayan Hanin
We come in peace hybrid development with web assembly - Maayan HaninWe come in peace hybrid development with web assembly - Maayan Hanin
We come in peace hybrid development with web assembly - Maayan HaninCodeValue
 
JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizationsChris Love
 
Disrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applicationsDisrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applicationsChris Love
 
Develop a vanilla.js spa you and your customers will love
Develop a vanilla.js spa you and your customers will loveDevelop a vanilla.js spa you and your customers will love
Develop a vanilla.js spa you and your customers will loveChris Love
 
Alfresco DevCon 2019: BiDirectional Sync to Other Platforms
Alfresco DevCon 2019: BiDirectional Sync to Other PlatformsAlfresco DevCon 2019: BiDirectional Sync to Other Platforms
Alfresco DevCon 2019: BiDirectional Sync to Other Platformsdavidocmillergmailcom
 
Progressive Web Apps and React
Progressive Web Apps and ReactProgressive Web Apps and React
Progressive Web Apps and ReactMike Melusky
 
How We Brought Advanced HTML5 Viewing to ADF
How We Brought Advanced HTML5 Viewing to ADFHow We Brought Advanced HTML5 Viewing to ADF
How We Brought Advanced HTML5 Viewing to ADFSeanGraham5
 
1. Let's study web-development
1. Let's study web-development1. Let's study web-development
1. Let's study web-developmentJungwon Seo
 
The Business Value of a PaaS (presented by Kieron Sambrook Smith, Chief Comme...
The Business Value of a PaaS (presented by Kieron Sambrook Smith, Chief Comme...The Business Value of a PaaS (presented by Kieron Sambrook Smith, Chief Comme...
The Business Value of a PaaS (presented by Kieron Sambrook Smith, Chief Comme...eZ Systems
 
Joe Emison - 10X Product Development
Joe Emison - 10X Product DevelopmentJoe Emison - 10X Product Development
Joe Emison - 10X Product DevelopmentServerlessConf
 
Advanced front end debugging with ms edge and ms tools
Advanced front end debugging with ms edge and ms toolsAdvanced front end debugging with ms edge and ms tools
Advanced front end debugging with ms edge and ms toolsChris Love
 
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...Vadym Kazulkin
 
Build 2017 - B8013 - Developing on Windows Server: Innovation for today and t...
Build 2017 - B8013 - Developing on Windows Server: Innovation for today and t...Build 2017 - B8013 - Developing on Windows Server: Innovation for today and t...
Build 2017 - B8013 - Developing on Windows Server: Innovation for today and t...Windows Developer
 

What's hot (20)

Alex Pshul: What We Learned by Testing Execution of 300K Messages/Min in a Se...
Alex Pshul: What We Learned by Testing Execution of 300K Messages/Min in a Se...Alex Pshul: What We Learned by Testing Execution of 300K Messages/Min in a Se...
Alex Pshul: What We Learned by Testing Execution of 300K Messages/Min in a Se...
 
Real World Progressive Web Apps (Building Flipkart Lite)
Real World Progressive Web Apps (Building Flipkart Lite)Real World Progressive Web Apps (Building Flipkart Lite)
Real World Progressive Web Apps (Building Flipkart Lite)
 
Service workers your applications never felt so good
Service workers   your applications never felt so goodService workers   your applications never felt so good
Service workers your applications never felt so good
 
Using Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the WebUsing Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the Web
 
We come in peace hybrid development with web assembly - Maayan Hanin
We come in peace hybrid development with web assembly - Maayan HaninWe come in peace hybrid development with web assembly - Maayan Hanin
We come in peace hybrid development with web assembly - Maayan Hanin
 
JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizations
 
Disrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applicationsDisrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applications
 
Develop a vanilla.js spa you and your customers will love
Develop a vanilla.js spa you and your customers will loveDevelop a vanilla.js spa you and your customers will love
Develop a vanilla.js spa you and your customers will love
 
Jumpstart Azure
Jumpstart AzureJumpstart Azure
Jumpstart Azure
 
Websites in the cloud
Websites in the cloudWebsites in the cloud
Websites in the cloud
 
Alfresco DevCon 2019: BiDirectional Sync to Other Platforms
Alfresco DevCon 2019: BiDirectional Sync to Other PlatformsAlfresco DevCon 2019: BiDirectional Sync to Other Platforms
Alfresco DevCon 2019: BiDirectional Sync to Other Platforms
 
Azure IoT Central
Azure IoT CentralAzure IoT Central
Azure IoT Central
 
Progressive Web Apps and React
Progressive Web Apps and ReactProgressive Web Apps and React
Progressive Web Apps and React
 
How We Brought Advanced HTML5 Viewing to ADF
How We Brought Advanced HTML5 Viewing to ADFHow We Brought Advanced HTML5 Viewing to ADF
How We Brought Advanced HTML5 Viewing to ADF
 
1. Let's study web-development
1. Let's study web-development1. Let's study web-development
1. Let's study web-development
 
The Business Value of a PaaS (presented by Kieron Sambrook Smith, Chief Comme...
The Business Value of a PaaS (presented by Kieron Sambrook Smith, Chief Comme...The Business Value of a PaaS (presented by Kieron Sambrook Smith, Chief Comme...
The Business Value of a PaaS (presented by Kieron Sambrook Smith, Chief Comme...
 
Joe Emison - 10X Product Development
Joe Emison - 10X Product DevelopmentJoe Emison - 10X Product Development
Joe Emison - 10X Product Development
 
Advanced front end debugging with ms edge and ms tools
Advanced front end debugging with ms edge and ms toolsAdvanced front end debugging with ms edge and ms tools
Advanced front end debugging with ms edge and ms tools
 
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
 
Build 2017 - B8013 - Developing on Windows Server: Innovation for today and t...
Build 2017 - B8013 - Developing on Windows Server: Innovation for today and t...Build 2017 - B8013 - Developing on Windows Server: Innovation for today and t...
Build 2017 - B8013 - Developing on Windows Server: Innovation for today and t...
 

Similar to "Progressive Web Apps" by Riza Fahmi (Hacktiv8)

An Introduction to Web Components
An Introduction to Web ComponentsAn Introduction to Web Components
An Introduction to Web ComponentsRed Pill Now
 
Web Apps and more
Web Apps and moreWeb Apps and more
Web Apps and moreYan Shi
 
Web app and more
Web app and moreWeb app and more
Web app and morefaming su
 
Dave Orchard - Offline Web Apps with HTML5
Dave Orchard - Offline Web Apps with HTML5Dave Orchard - Offline Web Apps with HTML5
Dave Orchard - Offline Web Apps with HTML5Web Directions
 
HTML5 on Mobile
HTML5 on MobileHTML5 on Mobile
HTML5 on MobileAdam Lu
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX DesignersAshlimarie
 
Mobile Apps with PhoneGap and jQuery Mobile
Mobile Apps with PhoneGap and jQuery MobileMobile Apps with PhoneGap and jQuery Mobile
Mobile Apps with PhoneGap and jQuery MobileTerry Ryan
 
App engine devfest_mexico_10
App engine devfest_mexico_10App engine devfest_mexico_10
App engine devfest_mexico_10Chris Schalk
 
Everything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the WebEverything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the WebJames Rakich
 
Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...
Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...
Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...John McCaffrey
 
Windy cityrails performance_tuning
Windy cityrails performance_tuningWindy cityrails performance_tuning
Windy cityrails performance_tuningJohn McCaffrey
 
IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009Christopher Judd
 
Introduction to Client Side Dev in SharePoint Workshop
Introduction to Client Side Dev in SharePoint WorkshopIntroduction to Client Side Dev in SharePoint Workshop
Introduction to Client Side Dev in SharePoint WorkshopMark Rackley
 
GDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
GDD Japan 2009 - Designing OpenSocial Apps For Speed and ScaleGDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
GDD Japan 2009 - Designing OpenSocial Apps For Speed and ScalePatrick Chanezon
 
[convergese] Adaptive Images in Responsive Web Design
[convergese] Adaptive Images in Responsive Web Design[convergese] Adaptive Images in Responsive Web Design
[convergese] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
Usability in the GeoWeb
Usability in the GeoWebUsability in the GeoWeb
Usability in the GeoWebDave Bouwman
 
Hybrid application development
Hybrid application developmentHybrid application development
Hybrid application developmentEngin Hatay
 
Fake it 'til you make it
Fake it 'til you make itFake it 'til you make it
Fake it 'til you make itJonathan Snook
 

Similar to "Progressive Web Apps" by Riza Fahmi (Hacktiv8) (20)

An Introduction to Web Components
An Introduction to Web ComponentsAn Introduction to Web Components
An Introduction to Web Components
 
Web Apps and more
Web Apps and moreWeb Apps and more
Web Apps and more
 
Web app and more
Web app and moreWeb app and more
Web app and more
 
Dave Orchard - Offline Web Apps with HTML5
Dave Orchard - Offline Web Apps with HTML5Dave Orchard - Offline Web Apps with HTML5
Dave Orchard - Offline Web Apps with HTML5
 
HTML5 on Mobile
HTML5 on MobileHTML5 on Mobile
HTML5 on Mobile
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX Designers
 
Mobile Apps with PhoneGap and jQuery Mobile
Mobile Apps with PhoneGap and jQuery MobileMobile Apps with PhoneGap and jQuery Mobile
Mobile Apps with PhoneGap and jQuery Mobile
 
App engine devfest_mexico_10
App engine devfest_mexico_10App engine devfest_mexico_10
App engine devfest_mexico_10
 
Everything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the WebEverything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the Web
 
Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...
Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...
Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...
 
Windy cityrails performance_tuning
Windy cityrails performance_tuningWindy cityrails performance_tuning
Windy cityrails performance_tuning
 
IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009
 
Introduction to Client Side Dev in SharePoint Workshop
Introduction to Client Side Dev in SharePoint WorkshopIntroduction to Client Side Dev in SharePoint Workshop
Introduction to Client Side Dev in SharePoint Workshop
 
GDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
GDD Japan 2009 - Designing OpenSocial Apps For Speed and ScaleGDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
GDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
 
[convergese] Adaptive Images in Responsive Web Design
[convergese] Adaptive Images in Responsive Web Design[convergese] Adaptive Images in Responsive Web Design
[convergese] Adaptive Images in Responsive Web Design
 
Usability in the GeoWeb
Usability in the GeoWebUsability in the GeoWeb
Usability in the GeoWeb
 
Hybrid application development
Hybrid application developmentHybrid application development
Hybrid application development
 
Web assembly with PWA
Web assembly with PWA Web assembly with PWA
Web assembly with PWA
 
Google Gears
Google GearsGoogle Gears
Google Gears
 
Fake it 'til you make it
Fake it 'til you make itFake it 'til you make it
Fake it 'til you make it
 

More from Tech in Asia ID

Sesi Tech in Asia PDC'21.pdf
Sesi Tech in Asia PDC'21.pdfSesi Tech in Asia PDC'21.pdf
Sesi Tech in Asia PDC'21.pdfTech in Asia ID
 
"ILO's Work on Skills Development" by Project Coordinators International Labo...
"ILO's Work on Skills Development" by Project Coordinators International Labo..."ILO's Work on Skills Development" by Project Coordinators International Labo...
"ILO's Work on Skills Development" by Project Coordinators International Labo...Tech in Asia ID
 
"Women in STEM: Leveraging Talent in ICT Sector" by Maya Juwita (Executive Di...
"Women in STEM: Leveraging Talent in ICT Sector" by Maya Juwita (Executive Di..."Women in STEM: Leveraging Talent in ICT Sector" by Maya Juwita (Executive Di...
"Women in STEM: Leveraging Talent in ICT Sector" by Maya Juwita (Executive Di...Tech in Asia ID
 
Laporan Kondisi Pendanaan Startup di Indonesia Kuartal Ketiga Tahun 2018
Laporan Kondisi Pendanaan Startup di Indonesia Kuartal Ketiga Tahun 2018Laporan Kondisi Pendanaan Startup di Indonesia Kuartal Ketiga Tahun 2018
Laporan Kondisi Pendanaan Startup di Indonesia Kuartal Ketiga Tahun 2018Tech in Asia ID
 
Laporan Kondisi Pendanaan Startup di Indonesia Kuartal Kedua Tahun 2018
Laporan Kondisi Pendanaan Startup di Indonesia Kuartal Kedua Tahun 2018Laporan Kondisi Pendanaan Startup di Indonesia Kuartal Kedua Tahun 2018
Laporan Kondisi Pendanaan Startup di Indonesia Kuartal Kedua Tahun 2018Tech in Asia ID
 
Laporan Kondisi Pendanaan Startup di Indonesia Kuartal Pertama Tahun 2018
Laporan Kondisi Pendanaan Startup di Indonesia Kuartal Pertama Tahun 2018Laporan Kondisi Pendanaan Startup di Indonesia Kuartal Pertama Tahun 2018
Laporan Kondisi Pendanaan Startup di Indonesia Kuartal Pertama Tahun 2018Tech in Asia ID
 
Laporan Kondisi Pendanaan Startup di Indonesia Tahun 2017
Laporan Kondisi Pendanaan Startup di Indonesia Tahun 2017Laporan Kondisi Pendanaan Startup di Indonesia Tahun 2017
Laporan Kondisi Pendanaan Startup di Indonesia Tahun 2017Tech in Asia ID
 
"Less Painful iOS Development" by Samuel Edwin (Tokopedia)
"Less Painful iOS Development" by Samuel Edwin (Tokopedia)"Less Painful iOS Development" by Samuel Edwin (Tokopedia)
"Less Painful iOS Development" by Samuel Edwin (Tokopedia)Tech in Asia ID
 
"Product Development Story Loket.com" by Aruna Laksana (Loket.com)
"Product Development Story Loket.com" by Aruna Laksana (Loket.com)"Product Development Story Loket.com" by Aruna Laksana (Loket.com)
"Product Development Story Loket.com" by Aruna Laksana (Loket.com)Tech in Asia ID
 
"Making Data Actionable" by Budiman Rusly (KMK Online)
"Making Data Actionable" by Budiman Rusly (KMK Online)"Making Data Actionable" by Budiman Rusly (KMK Online)
"Making Data Actionable" by Budiman Rusly (KMK Online)Tech in Asia ID
 
"DOKU under the hood : Infrastructure and Cloud Services Technology" by M. T...
"DOKU under the hood :  Infrastructure and Cloud Services Technology" by M. T..."DOKU under the hood :  Infrastructure and Cloud Services Technology" by M. T...
"DOKU under the hood : Infrastructure and Cloud Services Technology" by M. T...Tech in Asia ID
 
Citcall : Real-Time User Verification with Missed-Call Based OTP
Citcall : Real-Time User Verification with Missed-Call Based OTPCitcall : Real-Time User Verification with Missed-Call Based OTP
Citcall : Real-Time User Verification with Missed-Call Based OTPTech in Asia ID
 
"Functional Programming in a Nutshell" by Adityo Pratomo (Froyo Framework)
"Functional Programming in a Nutshell" by Adityo Pratomo (Froyo Framework)"Functional Programming in a Nutshell" by Adityo Pratomo (Froyo Framework)
"Functional Programming in a Nutshell" by Adityo Pratomo (Froyo Framework)Tech in Asia ID
 
"Building High Performance Search Feature" by Setyo Legowo (UrbanIndo)
"Building High Performance Search Feature" by Setyo Legowo (UrbanIndo)"Building High Performance Search Feature" by Setyo Legowo (UrbanIndo)
"Building High Performance Search Feature" by Setyo Legowo (UrbanIndo)Tech in Asia ID
 
"Building Effective Developer-Designer Relationships" by Ifnu Bima (Blibli.com)
"Building Effective Developer-Designer Relationships" by Ifnu Bima (Blibli.com)"Building Effective Developer-Designer Relationships" by Ifnu Bima (Blibli.com)
"Building Effective Developer-Designer Relationships" by Ifnu Bima (Blibli.com)Tech in Asia ID
 
"Data Informed vs Data Driven" by Casper Sermsuksan (Kulina)
"Data Informed vs Data Driven" by Casper Sermsuksan (Kulina)"Data Informed vs Data Driven" by Casper Sermsuksan (Kulina)
"Data Informed vs Data Driven" by Casper Sermsuksan (Kulina)Tech in Asia ID
 
"Planning Your Analytics Implementation" by Bachtiar Rifai (Kofera Technology)
"Planning Your Analytics Implementation" by Bachtiar Rifai (Kofera Technology)"Planning Your Analytics Implementation" by Bachtiar Rifai (Kofera Technology)
"Planning Your Analytics Implementation" by Bachtiar Rifai (Kofera Technology)Tech in Asia ID
 
"How To Build and Lead a Winning Data Team" by Cahyo Listyanto (Bizzy.co.id)
"How To Build and Lead a Winning Data Team" by Cahyo Listyanto (Bizzy.co.id)"How To Build and Lead a Winning Data Team" by Cahyo Listyanto (Bizzy.co.id)
"How To Build and Lead a Winning Data Team" by Cahyo Listyanto (Bizzy.co.id)Tech in Asia ID
 
"How Scrum Motivates People" by Rudy Rahadian (XL Axiata)
"How Scrum Motivates People" by Rudy Rahadian (XL Axiata)"How Scrum Motivates People" by Rudy Rahadian (XL Axiata)
"How Scrum Motivates People" by Rudy Rahadian (XL Axiata)Tech in Asia ID
 

More from Tech in Asia ID (20)

Sesi Tech in Asia PDC'21.pdf
Sesi Tech in Asia PDC'21.pdfSesi Tech in Asia PDC'21.pdf
Sesi Tech in Asia PDC'21.pdf
 
"ILO's Work on Skills Development" by Project Coordinators International Labo...
"ILO's Work on Skills Development" by Project Coordinators International Labo..."ILO's Work on Skills Development" by Project Coordinators International Labo...
"ILO's Work on Skills Development" by Project Coordinators International Labo...
 
"Women in STEM: Leveraging Talent in ICT Sector" by Maya Juwita (Executive Di...
"Women in STEM: Leveraging Talent in ICT Sector" by Maya Juwita (Executive Di..."Women in STEM: Leveraging Talent in ICT Sector" by Maya Juwita (Executive Di...
"Women in STEM: Leveraging Talent in ICT Sector" by Maya Juwita (Executive Di...
 
Laporan Kondisi Pendanaan Startup di Indonesia Kuartal Ketiga Tahun 2018
Laporan Kondisi Pendanaan Startup di Indonesia Kuartal Ketiga Tahun 2018Laporan Kondisi Pendanaan Startup di Indonesia Kuartal Ketiga Tahun 2018
Laporan Kondisi Pendanaan Startup di Indonesia Kuartal Ketiga Tahun 2018
 
LinkedIn Pitch Deck
LinkedIn Pitch DeckLinkedIn Pitch Deck
LinkedIn Pitch Deck
 
Laporan Kondisi Pendanaan Startup di Indonesia Kuartal Kedua Tahun 2018
Laporan Kondisi Pendanaan Startup di Indonesia Kuartal Kedua Tahun 2018Laporan Kondisi Pendanaan Startup di Indonesia Kuartal Kedua Tahun 2018
Laporan Kondisi Pendanaan Startup di Indonesia Kuartal Kedua Tahun 2018
 
Laporan Kondisi Pendanaan Startup di Indonesia Kuartal Pertama Tahun 2018
Laporan Kondisi Pendanaan Startup di Indonesia Kuartal Pertama Tahun 2018Laporan Kondisi Pendanaan Startup di Indonesia Kuartal Pertama Tahun 2018
Laporan Kondisi Pendanaan Startup di Indonesia Kuartal Pertama Tahun 2018
 
Laporan Kondisi Pendanaan Startup di Indonesia Tahun 2017
Laporan Kondisi Pendanaan Startup di Indonesia Tahun 2017Laporan Kondisi Pendanaan Startup di Indonesia Tahun 2017
Laporan Kondisi Pendanaan Startup di Indonesia Tahun 2017
 
"Less Painful iOS Development" by Samuel Edwin (Tokopedia)
"Less Painful iOS Development" by Samuel Edwin (Tokopedia)"Less Painful iOS Development" by Samuel Edwin (Tokopedia)
"Less Painful iOS Development" by Samuel Edwin (Tokopedia)
 
"Product Development Story Loket.com" by Aruna Laksana (Loket.com)
"Product Development Story Loket.com" by Aruna Laksana (Loket.com)"Product Development Story Loket.com" by Aruna Laksana (Loket.com)
"Product Development Story Loket.com" by Aruna Laksana (Loket.com)
 
"Making Data Actionable" by Budiman Rusly (KMK Online)
"Making Data Actionable" by Budiman Rusly (KMK Online)"Making Data Actionable" by Budiman Rusly (KMK Online)
"Making Data Actionable" by Budiman Rusly (KMK Online)
 
"DOKU under the hood : Infrastructure and Cloud Services Technology" by M. T...
"DOKU under the hood :  Infrastructure and Cloud Services Technology" by M. T..."DOKU under the hood :  Infrastructure and Cloud Services Technology" by M. T...
"DOKU under the hood : Infrastructure and Cloud Services Technology" by M. T...
 
Citcall : Real-Time User Verification with Missed-Call Based OTP
Citcall : Real-Time User Verification with Missed-Call Based OTPCitcall : Real-Time User Verification with Missed-Call Based OTP
Citcall : Real-Time User Verification with Missed-Call Based OTP
 
"Functional Programming in a Nutshell" by Adityo Pratomo (Froyo Framework)
"Functional Programming in a Nutshell" by Adityo Pratomo (Froyo Framework)"Functional Programming in a Nutshell" by Adityo Pratomo (Froyo Framework)
"Functional Programming in a Nutshell" by Adityo Pratomo (Froyo Framework)
 
"Building High Performance Search Feature" by Setyo Legowo (UrbanIndo)
"Building High Performance Search Feature" by Setyo Legowo (UrbanIndo)"Building High Performance Search Feature" by Setyo Legowo (UrbanIndo)
"Building High Performance Search Feature" by Setyo Legowo (UrbanIndo)
 
"Building Effective Developer-Designer Relationships" by Ifnu Bima (Blibli.com)
"Building Effective Developer-Designer Relationships" by Ifnu Bima (Blibli.com)"Building Effective Developer-Designer Relationships" by Ifnu Bima (Blibli.com)
"Building Effective Developer-Designer Relationships" by Ifnu Bima (Blibli.com)
 
"Data Informed vs Data Driven" by Casper Sermsuksan (Kulina)
"Data Informed vs Data Driven" by Casper Sermsuksan (Kulina)"Data Informed vs Data Driven" by Casper Sermsuksan (Kulina)
"Data Informed vs Data Driven" by Casper Sermsuksan (Kulina)
 
"Planning Your Analytics Implementation" by Bachtiar Rifai (Kofera Technology)
"Planning Your Analytics Implementation" by Bachtiar Rifai (Kofera Technology)"Planning Your Analytics Implementation" by Bachtiar Rifai (Kofera Technology)
"Planning Your Analytics Implementation" by Bachtiar Rifai (Kofera Technology)
 
"How To Build and Lead a Winning Data Team" by Cahyo Listyanto (Bizzy.co.id)
"How To Build and Lead a Winning Data Team" by Cahyo Listyanto (Bizzy.co.id)"How To Build and Lead a Winning Data Team" by Cahyo Listyanto (Bizzy.co.id)
"How To Build and Lead a Winning Data Team" by Cahyo Listyanto (Bizzy.co.id)
 
"How Scrum Motivates People" by Rudy Rahadian (XL Axiata)
"How Scrum Motivates People" by Rudy Rahadian (XL Axiata)"How Scrum Motivates People" by Rudy Rahadian (XL Axiata)
"How Scrum Motivates People" by Rudy Rahadian (XL Axiata)
 

Recently uploaded

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 

Recently uploaded (20)

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 

"Progressive Web Apps" by Riza Fahmi (Hacktiv8)

  • 1. Progressive Web Apps What, why and how rizafahmi.com
  • 3. We already Did it! Believe it or not Responsive, mobile first layout Cache, Localstorage, etc.
  • 4.
  • 5. HTML5 is a new hotness 2009 HTML5
  • 7. HTML5 is a new Notness
  • 8. HTML5 is a new Notness "The biggest mistake we made as a company was be!ng too much on HTML5 as opposed to na"ve.” This guy From Facebook
  • 10. Native Advantages ✓ Great performance ✓ Smooth anima!ons & interac!ons ✓ Instant loading & offline support ✓ Easy access through home screen
  • 11. x Distribu=on problems x Upda=ng is a pain x Extra care with low memory phone x Applica=on size Native disadvantages
  • 12. Web StrikeS Back! HTML5 20122009 Facebook Hybrid App Mobile apps rules! 2016 Web strikes back
  • 13. Best of Both Worlds Progressive Web Apps
  • 14. What Progressive Web Apps Is Engaging App-like Linkable Reliable Fast Secure
  • 15. Case Studies 63% 
 users on 2G 70% 
 increase on conversion
  • 16. Case Studies 75% 
 increase in Tweet Sent 65% 
 increase in pages per session 20% 
 decrease in bounce rate
  • 17. Case Studies 104% 
 higher conversion rate 2x
 page visit 74% 
increase "me spent
  • 19. Service Woker App Manifest
  • 21. Our Project✓ Single page app for local meetup videos ✓ Offline support via browser caches ✓ Modern, ES6 JavaScript syntax, no framework ✓ Mul"pla$orm, Android and iOS ✓ Na"ve app look & feel ✓ Fullscreen app ✓ Splash screen ✓ Home screen icon Engineers.id
  • 22. Our Plan✓ Design App Shell ✓ Ge!ng The Data from API ✓ Using Service Worker: ✓ Caching App Shell ✓ Caching Data Engineers.id ✓ Na"ve-like apps: ✓ Standalone app ✓ Adding App Icons ✓ Adding Splas Screen ✓ Deploy and securing our app
  • 23. Tools Chrome DevTools - Device Mode ✓Simulate device web experiences ✓Responsive breakpoint visualiza"on ✓First meaningful paint, metrics, etc ✓Service worker, manifest, etc
  • 24. Tools iOS Simulator ✓localhost is your machine ✓Cri"cal for tes"ng apple-specific features ✓Connect to desktop’s safari for debugging
  • 25. Tools Android Emulator ✓10.0.2.2 is your machine ✓Connect to desktop’s chrome for debugging
  • 26. Tools Lighthouse ✓Chrome extension or CLI ✓Checklist for our progressive enhancements ✓Performance sugges"ons
  • 27. Designing The App Shell Content Applica"on Shell Step 1
  • 28. <!DOCTYPE html> <html> <head> <meta charset=utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv="x-ua-compatible" content="ie-edge"> <meta name="description" content="Best video resources for learn programming"> <link rel="stylesheet" href=“styles/main.css" type="text/css" media="screen" charset="utf-8"> <link rel="stylesheet" href="styles/spinner.css" type="text/css" media="screen" charset="utf-8"> <title>Engieers.id </title> </head>
  • 29. <body> <nav> <div class="left"> <a href="/"> <h1>Engineers.id </h1> </a> </div> <div class="right"> <button onclick="location.reload()" class="btn card__btn">Refresh </button> </div> </nav> <div class=“spinner”> ... </div> <ul class="cards"> </ul> <script id="card" type="text/template"> <li class="cards__item"> </li> </script> </body>
  • 31. Get The Data Step 2 // scripts/app.js const url = 'https: //engineers-id-backend- ybbwzovhnl.now.sh/api/videos' fetch(url) .then(response => response.json()) .then(json => { appendData(json) })
  • 33. fetch Polyfill <!-- index.html --> <html> <head> ... </head> <body> <!-- ... --> <script src="scripts/vendors/fetch.js"> </script> <script src="scripts/app.js"> </script> </body> </html>
  • 35. Zoom it out! Naviga"on begins
 (17ms) First conten$ul paint (600ms) First meaningful paint (1.58s) Time to interac"ve (1.8s)
  • 36. Service Worker Not really a new technology Parallel, not just concurrent Independent script Sends message to origin
  • 37. Register Service Worker Step 3 // scripts/app.js if ('serviceWorker' in navigator) { navigator.serviceWorker.register('./service- worker.js').then(function () { console.log('Service Worker Registered') }) }
  • 40. Cache The App Shell Step 4 // service-worker.js var cacheName = ‘engineers-id’ var filesToCache = [ '/', '/index.html', '/scripts/app.js', ‘/styles/main.css', '/styles/spinner.css', ‘/images/logo.svg', // ... ] self.addEventListener('install', function (e) { e.waitUntil( caches.open(cacheName).then(function (cache) { return cache.addAll(filesToCache) }) ) })
  • 41. Cache The App Shell Step 4
  • 42. Wait, How Service Worker actually work?! Service worker Installing Ac"vated Error Idle Push Fetch Terminated Web page Caching App Shell
  • 44. Caching Strategy - Cache Only //service-worker.js self.addEventListener('fetch', function (event) { // If a match isn't found in the cache, the response // will look like a connection error event.respondWith(caches.match(event.request)) })
  • 45. Caching Strategy - Network Only self.addEventListener('fetch', function (event) { event.respondWith(fetch(event.request)) // or simply don't call event.respondWith, which // will result in default browser behaviour })
  • 46. Caching Strategy - Cache, failing back to network //service-worker.js self.addEventListener('fetch', function (event) { event.respondWith( caches.match(event.request).then(function (response) { return response || fetch(event.request) }) ) })
  • 47. Caching Strategy - Cache, NetworK Race // service-worker.js function promiseAny (promises) { return new Promise((resolve, reject) => { promises = promises.map(p => Promise.resolve(p)) promises.forEach(p => p.then(resolve)) promises .reduce((a, b) => a.catch(() => b)) .catch(() => reject(Error('All failed'))) }) } self.addEventListener('fetch', function (event) { event.respondWith( promiseAny([caches.match(event.request), fetch(event.request)]) ) })
  • 48. Caching Strategy - Cache Then Network // service-worker.js self.addEventListener('fetch', function (event) { event.respondWith( caches.open('mysite-dynamic').then(function (cache) { return fetch(event.request).then(function (response) { cache.put(event.request, response.clone()) return response }) }) ) })
  • 49. Caching Strategy - Network Falling Back To Cache self.addEventListener('fetch', function (event) { event.respondWith( fetch(event.request).catch(function () { return caches.match(event.request) }) ) })
  • 50. Cache The Content Step 5 // service-worker.js self.addEventListener('fetch', e => { e.respondWith( caches.open(dataCacheName).then(cache => { return fetch(e.request) .then(networkResponse => { cache.put(e.request, networkResponse.clone()) return networkResponse }) .catch(() => { return caches.match(e.request) }) }) ) })
  • 51. When Our Users Going Rogue...
  • 52. Recap
  • 54. App Manifest // manifest.json { "name": "Engineers.id", "short_name": "eng.id", "lang": "en-US", "start_url": "/index.html", "display": "standalone", "theme_color": "#fff", "icons": [ { "src": "images/icons/icon-128x128.png", "sizes": "128x128", "type": "image/png" }, ... ], "background_color": “#fff”, “orientation”: “portrait” }
  • 55. App Manifest - Display Mode ‘fullscreen’ ‘standalone’ ‘minimal-ui’ ‘browser’
  • 56. App Manifest - Icons 144px by 144px 128px by 128px 192px by 192px 256px by 256px 512px by 512px
  • 57. App Manifest - Home Screen Icons 48 dp icons for home screen and task switcher 144px by 144px 192px by 192px 48px by 48px 96px by96px
  • 58. App Manifest - Splash Screen Icons 128 dp icons for splash screen 128px by 128px 256px by 256px 512px by 512px { "name": "Engineers.id", "short_name": "eng.id", "lang": "en-US", "start_url": "/index.html", "display": "standalone", "theme_color": "#fff", "icons": [], "background_color": “#fff”, “orientation”: “portrait” }
  • 59. App Manifest <!-- index.html --> <link rel="manifest" href="manifest.json">
  • 60. Install Banners { "name": "Engineers.id", "short_name": "eng.id", "lang": "en-US", "start_url": "/index.html", "display": "standalone", "theme_color": "#fff", "icons": [ ... { "src": "images/icons/icon-144x144.png", "sizes": "144x144", "type": "image/png" }, ], "background_color": “#fff”, “orientation”: “portrait” }
  • 63. One last thing: Deploy h%ps://zeit.co/now