Como Progressive
Web Apps
pode mudar a vida do seu site
Leonn Leite
@leonnleite

/leonnleite

+leonnleite
made in
Taguá!
Nova Iorque do cerrado!
WEB vs APP
https://www.youtube.com/watch?v=m-sCdS0sQO8
https://www.youtube.com/watch?v=m-sCdS0sQO8
EU NÃO FAÇO/SOU
COACHING
SEU APP
NÃO VAI TER
ENGAJAMENTO
O SEU PROBLEMA
PODE SER
RESOLVIDO
NA WEB
PROGRESSIVE
WEB APPS
<a href=“pagar-estacionamento.html“>Pagar Estacionamento</a>
<a href=“ver-estoque-brusinha.html“>Estoque das Brusinha</a>
<a href=“pagar-estacionamento.html“>Pagar Estacionamento</a>
<a href=“ver-estoque-brusinha.html“>Estoque das Brusinha</a>
<a href=“pagar-estacionamento.html“>Pagar Estacionamento</a>
<a href=“ver-estoque-brusinha.html“>Estoque das Brusinha</a>
URI’s
HTTPS
USE SEMPRE
SERIO
PROGRESSIVE
WEB APPS
VISUAL
APPFICADO
–Sergio Lopes
https://www.godaddy.com/garage/googles-mobile-first-index-how-you-can-prepare-your-website/
http://agenciabrasil.ebc.com.br/geral/noticia/2016-12/ibge-celular-se-consolida-como-o-principal-meio-de-acesso-internet-no-brasil
em
2016
92,1%
dos domicílios brasileiros acessaram internet pelo
celular
THEME COLOR
<meta name="theme-color" content="#333333">
quaggajs
ISSO FUNCIONA
EM TODOS OS
NAVEGADORES?
MAS É CLARO QUE
NÃO
http://outdatedbrowser.com/en
http://outdatedbrowser.com/en
PROGRESSIVE
WEB APPS
Então digita,
macho vei!
MAS APP DÁ
PRA USAR
OFFLINE
<html manifest="example.appcache">
...
</html>
CACHE MANIFEST
# v1 - 2011-08-13
# This is a comment.
http://www.example.com/index.html
http://www.example.com/header.png
http://www.example.com/blah/blah
<html manifest="example.appcache">
...
</html>
CACHE MANIFEST
# v1 - 2011-08-13
# This is a comment.
http://www.example.com/index.html
http://www.example.com/header.png
http://www.example.com/blah/blah
DEPRECIADO
self.addEventListener('install', function(event) {
event.waitUntil(
caches
.open('phpeste-v1') //return promise
.then(function(cache) {
return cache.addAll([‘a.js’, ‘b.js’…]);
})
);
});
ABRE A COLEÇÃO DO CACHE. SE NÃO EXISTIR, CRIA
self.addEventListener('install', function(event) {
event.waitUntil(
caches
.open('phpeste-v1') //return promise
.then(function(cache) {
return cache.addAll([‘a.js’, ‘b.js’…]);
})
);
});
NO ADDALL, ADICIONA ELEMENTOS AO CACHE
GERALMENTE
COLOCAMOS NA
INSTALAÇÃO
DO SW
self.addEventListener('install', function(event) {
event.waitUntil(
caches
.open('phpeste-v1') //return promise
.then(function(cache) {
return cache.addAll([‘a.js’, ‘b.js’…]);
})
);
});
PROGRESSIVE
WEB APPS
if (navigator.serviceWorker) {
navigator.serviceWorker.register('sw.js');
}
INSTALÁVEL
IOS
<!-- Add to homescreen for Safari on iOS -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content=“Leonnzera">
<link rel="apple-touch-icon-precomposed" href="images/ios-desktop.png">
web manifest
<link rel="manifest" href=“manifest.json”>
install banners
https://leonnleite.github.io/pwa-sample
material design lite
https://getmdl.io/
bateria
navigator.getBattery().then(battery => {
console.log(battery.level)
});
gravar audio
navigator.mediaDevices
tipo de conexão
navigator.connection
vibrar
navigator.vibrate(100)
navigator.vibrate([100, 200…])
pagamento
window.PaymentRequest
new PaymentRequest(…);
Leitor qr code, código de barras
Notifications (push e local)
Geolocations
background sync
autocomplete
credentials manager
offline
https://pwa.rocks/
https://pwa-directory.appspot.com/
este é o futuro da web,
principalmente para o mobile
- Sergio Lopes
obrigado

Como progressive web apps pode mudar a vida do seu site