SlideShare uma empresa Scribd logo
1 de 52
Baixar para ler offline
PWA
Progressive Web Apps
Yusuf Koraman - Software Infrastructure
“A new way to deliver amazing user experiences on the web.”
Summary
1. PWA , What? How? Who?
2. Browser Capabilities
3. Characteristics & Benefits
4. Architecture
1. Service Workers & Demo
2. Manifest File & Demo
3. Service Workers & Apis & Demo
5. Case Studies
What’s PWA?
Progressive Web App (PWA), in general, is a term used to denote web apps that use the latest web
technologies
Progressive Web Apps, also known as Installable Web Apps or Hybrid Web Apps
This new application type attempts to combine features offered by most modern browsers with
the benefits of mobile experience
Progressive Web Apps are enabled by the Application Manifest and Service Workers standards
by W3C.
How PWA works?
Minimum Requirements : Html, Css, Javascript.
Depends on OS
Web Site > Install Banner/ Properties > Add to Shortcut > Pwa working as a native/ hybrid apps.
Ex : https://www.flipkart.com/
Who?
In 2015, designer Frances Berriman and Google Chrome engineer Alex Russell coined the term
"Progressive Web Apps" to describe apps taking advantage of new features supported by modern
browsers, including service workers and web app manifests, that let users upgrade web apps to
progressive web applications in their native operating system (OS)
Web or Native? “Browser Capabilities”
chrome://settings/content
http://caniuse.com/#search=bluetooth
http://caniuse.com/#search=camera
Characteristics
● Service workers allow work offline, or on
low quality networks.
● A service worker, written in JavaScript, is
like a client-side proxy and puts you in
control of the cache and how to respond
to resource requests. By pre-caching key
resources you can eliminate the
dependence on the network, ensuring an
instant and reliable experience for your
users.
Reliable
Fast
53% of users will abandon a site if it takes
longer than 3 seconds to load! And once
loaded, users expect them to be fast—no
janky scrolling or slow-to-respond
interfaces.
Characteristics
Characteristics
Engaging
Progressive Web Apps are
installable and live on the user's
home screen, without the need for
an app store. They offer an
immersive full screen experience
with help from a web app manifest
file and can even re-engage users
with web push notifications.
Characteristics
Characteristics
Progressive - Work for every user, regardless of browser choice.
Responsive - Fit any form factor: desktop, mobile, tablet, or forms yet to emerge.
App-like - Feel like an app to the user with app-style interactions and navigation.
Fresh - Always up-to-date thanks to the service worker update process.
Safe - Served via HTTPS to prevent snooping and ensure content hasn’t been tampered with.
Discoverable - Are identifiable as “applications” thanks to W3C manifests[6] and service worker
registration scope allowing search engines to find them.
Re-engageable - Make re-engagement easy through features like push notifications.
Installable - Allow users to “keep” apps they find most useful on their home screen without the hassle of
an app store.
Linkable - Easily shared via a URL and do not require complex installation.
Characteristics
Why build a Progressive Web App?
Why build a Progressive Web App?
Twitter Lite PWA Significantly Increases Engagement and Reduces Data Usage
65% increase in pages per session
75% increase in Tweets sent
20% decrease in bounce rate
Nicolas Gallagher, the Engineering Lead for Twitter Lite,
notes:
Twitter Lite is now the fastest, least expensive, and most
reliable way to use Twitter. The web app rivals the
performance of our native apps but requires less than 3% of
the device storage space compared to Twitter for Android.
Why build a Progressive Web App?
25% higher revenue per article pageview
4X faster average page-load speed
43% longer average time on site
34% more page views per session
24% lower bounce rates
Why build a Progressive Web App?
 76% higher conversions across browsers
 14% more monthly active users on iOS; 30% on Android
 4X higher interaction rate from Add to Homescreen
Why build a Progressive Web App?
• Users time on site with Flipkart lite vs. previous mobile
experience: 3.5 minutes vs 70 seconds.
• 3x more time spent on site
• 40% higher re-engagement rate
• 70% greater conversion rate among those arriving via Add to
Homescreen
• 3x lower data usage
Basic’s of PWA
Progressive Web Apps are enabled by the Application Manifest and Service Workers standards by
(World Wide Web Consortium (W3C)
Browser Supports
http://caniuse.com/#search=Manifest
Browser Supports
http://caniuse.com/#search=service%20worker
How can i understand a web site is PWA?
"/b9af9805d4535bd3.png
PWA Support & Light house
https://developers.google.com/web/ilt/pwa/lighthouse-pwa-analysis-tool
PWA Support & Light house
PWA is a SPA?
PWA != SPA
Current Status
The Safari (Apple) team has started work on serviceWorkers.
PWAs running on Android are now actually installed locally and work like native apps
WebUSB API is appearing with Chrome 61, giving web developers access to USB units
navigator.share API enables triggering the native OS share menu
Front end frameworks are rapidly evolving and maturing
Architecture
Application Shell Architecture
The app "shell" is the minimal HTML,
CSS and JavaScript required to power
the user interface and when cached
offline can ensure instant, reliably
good performance to users on repeat
visits. This means the application shell is
not loaded from the network every time
the user visits. Only the necessary
content is needed from the network.
Service Workers
A service worker is a script that your browser runs in the background, separate from a web page, opening the
door to features that don't need a web page or user interaction.
Before service worker, there was one other API that gave users an offline experience on the web
called AppCache.
It's a JavaScript Worker, so it can't access the DOM directly.
Service worker can communicate with the pages it controls by responding to messages sent via
the postMessage interface, and those pages can manipulate the DOM if needed
Service worker is a programmable network proxy, allowing you to control how network requests from your
page are handled
A service worker has a lifecycle that is completely separate from your web page.
Service Worker’s LifeCycle
Update a service worker
1. Update your service worker JavaScript file. If there is even a byte's difference in the service worker
file compared to what it currently has, it considers it new.
2. Your new service worker will be started and the install event will be fired.
3. At this point the old service worker is still controlling the current pages so the new service worker will
enter a waiting state.
4. When the currently open pages of your site are closed, the old service worker will be killed and the
new service worker will take control.
5. Once your new service worker takes control, its activate event will be fired.
Service Worker - Update & Skip Waiting
Use service worker tools, such as sw-precache, for example to reliably cache and update the service worker tha
manages your static content.
Security
You need HTTPS
During development you'll be able to use service worker through localhost, but to deploy it on a site
you'll need to have HTTPS setup on your server.
Using service worker you can hijack connections, fabricate, and filter responses. While you would use
these powers for good, a man-in-the-middle might not.
" Service Worker Registration
" Check Lifecycle
"Service Worker Caches
"Lazy load & Static caches
As of Chrome version 42, the Push API and Notification API are available to developers.
Background sync is a new web API that lets you defer actions until the user has stable connectivity. This is useful for ensuring that whatever
the user wants to send, is actually sent.
Location : navigator.geolocation.getCurrentPosition(function(result){console.log(result);})
Full Screen : Fullscreen : document.body.webkitRequestFullscreen();
AppCache
As of Chrome 50, the Geolocation API only works on secure contexts (HTTPS). If your site is hosted on a non-secure origin (such as HTTP),
any requests for the user's location no longer function.
Device orientation & Motion
Fullscreen Experiences
Click to Call
Service Worker & APIs
Web Push Notifications
Push Notification & Client Side
A PushSubscription contains all the information we need to send a push message to that
user. You can "kind of" think of this as an ID for that user's device.
Push Notifications & Client Side
Push is based on service workers because service workers operate in the background.
APIs: push is invoked when a server supplies information to a service worker; a notification is the action
of a service worker or web page script showing information to a user.
serviceWorkerRegistration.showNotification(title, options);
Notification OnClick & Client Side
const examplePage = '/demos/notification-examples/example-page.html';
  const promiseChain = clients.openWindow(examplePage);
  event.waitUntil(promiseChain);
self.addEventListener('notificationclick', function(event) {
  if (!event.action) {
    // Was a normal notification click
    console.log('Notification Click.');
    return;
  }
Notification Permissions & Client Side
function askPermission() {
  return new Promise(function(resolve, reject) {
    const permissionResult = Notification.requestPermission(function(result) {
      resolve(result);
    });
    if (permissionResult) {
      permissionResult.then(resolve, reject);
    }
  })
  .then(function(permissionResult) {
    if (permissionResult !== 'granted') {
      throw new Error('We weren't granted permission.');
    }
  });
}
Push Event on the User's Device
Once we've sent a push message, the push service will keep your message on its server until one of
following events occurs:
1. The device comes online and the push service delivers the message.
2. The message expires. If this occurs the push service removes the message from its queue and
it'll never be delivered.
Push Notification FAQs
Can I change the push service a browser uses?
No. The push service is selected by the browser and as we saw with the subscribe() call, the browser will make
network requests to the push service to retrieve the details that make up the PushSubscription.
Each browser uses a different Push Service, don't they have different API's?
All push services will expect the same API.
If I subscribe a user on their desktop, are they subscribed on their phone as well?
Unfortunately not. A user must register for push on each browser they wish to receive messages on. It's also worth
noting that this will require the user granting permission on each device.
" Service Worker & Push Notifications
Service Workers & Sync
Background sync is a new web API that lets you defer actions until the user has stable connectivity. This is useful for
ensuring that whatever the user wants to send, is actually sent.
Register:
// Then later, request a one-off sync:
navigator.serviceWorker.ready.then(function(swRegistration) {
return swRegistration.sync.register('myFirstSync');
});
Usage:
self.addEventListener('sync', function(event) {
if (event.tag == 'myFirstSync') {
event.waitUntil(doSomeStuff());
}
});
• You can only register for a sync event when the user has a window open to the site.
" Service Worker & Sync
Offline Storages For PWA
Cache API : async
IndexedDB : async
Web Storage (LocalStorage and SessionStorage) : sync, has no Web Worker support and is size and
type (strings only) limited.
Cookies : have their uses but are synchronous & web worker support and are also size-limited.
WebSQL : does not have broad browser support and its use is not recommended.
The File System API : is not supported on any browser besides Chrome.
Debugging support for IndexedDB is now available in Chrome(Application tab),
Opera, Firefox (Storage Inspector) and Safari (see the Storage tab).
How much can I store?
"IndexedDB Max Sizes
" Index DB Sample
Other API Samples
" Other APIs & Media Sample
Manifest
The web app manifest is a simple JSON file that gives you, the developer, the ability to control how your app appears to the user
{
  "short_name": "AirHorner",
  "name": "Kinlan's AirHorner of Infamy",
  "icons": [
    {
      "src": "launcher-icon-1x.png",
      "type": "image/png",
      "sizes": "48x48"
    },
    {
      "src": "launcher-icon-2x.png",
      "type": "image/png",
      "sizes": "96x96"
    },
    {
      "src": "launcher-icon-4x.png",
      "type": "image/png",
      "sizes": "192x192"
    }
  ],
  "start_url": “index.html?launcher=true”,
“background_color": “#2196F3”,
“theme_color": “#2196F3”,
“display": “standalone",
“orientation": "landscape"
}
https://developer.mozilla.org/en-US/docs/Web/Manifest
" Manifest Sample
Case Studies
https://developers.google.com/web/showcase/region/#europe
Questions

Mais conteúdo relacionado

Mais procurados

PWA - Progressive Web App
PWA - Progressive Web AppPWA - Progressive Web App
PWA - Progressive Web AppRobert Robinson
 
Introduction to Progressive Web Apps (PWA)
Introduction to Progressive Web Apps (PWA)Introduction to Progressive Web Apps (PWA)
Introduction to Progressive Web Apps (PWA)Sandip Nirmal
 
Introduction to Progressive Web App
Introduction to Progressive Web AppIntroduction to Progressive Web App
Introduction to Progressive Web AppBinh Bui
 
Building a Progressive Web App
Building a  Progressive Web AppBuilding a  Progressive Web App
Building a Progressive Web AppIdo Green
 
Introduction of Progressive Web App
Introduction of Progressive Web AppIntroduction of Progressive Web App
Introduction of Progressive Web AppSankalp Khandelwal
 
Progressive Web Apps / GDG DevFest - Season 2016
Progressive Web Apps / GDG DevFest - Season 2016Progressive Web Apps / GDG DevFest - Season 2016
Progressive Web Apps / GDG DevFest - Season 2016Abdelrahman Omran
 
Why Progressive Web App is what you need for your Business
Why Progressive Web App is what you need for your BusinessWhy Progressive Web App is what you need for your Business
Why Progressive Web App is what you need for your BusinessLets Grow Business
 
Progressive Web Apps (PWAs): Why you want one & how to optimize them #Applaus...
Progressive Web Apps (PWAs): Why you want one & how to optimize them #Applaus...Progressive Web Apps (PWAs): Why you want one & how to optimize them #Applaus...
Progressive Web Apps (PWAs): Why you want one & how to optimize them #Applaus...Aleyda Solís
 
Progressive Web APP ( PWA )
Progressive Web APP ( PWA ) Progressive Web APP ( PWA )
Progressive Web APP ( PWA ) Bijaya Oli
 
Build progressive web apps with Angular
Build progressive web apps with AngularBuild progressive web apps with Angular
Build progressive web apps with AngularSimona Cotin
 
Cross browser testing with browser stack
Cross browser testing with browser stackCross browser testing with browser stack
Cross browser testing with browser stackDenys Poloka
 
Mobile App Screens UI UX Flowcharts Proposal PowerPoint Presentation Slides
Mobile App Screens UI UX Flowcharts Proposal PowerPoint Presentation SlidesMobile App Screens UI UX Flowcharts Proposal PowerPoint Presentation Slides
Mobile App Screens UI UX Flowcharts Proposal PowerPoint Presentation SlidesSlideTeam
 
Progressive Web Apps and React
Progressive Web Apps and ReactProgressive Web Apps and React
Progressive Web Apps and ReactMike Melusky
 

Mais procurados (20)

Progressive Web Apps(PWA)
Progressive Web Apps(PWA)Progressive Web Apps(PWA)
Progressive Web Apps(PWA)
 
PWA - Progressive Web App
PWA - Progressive Web AppPWA - Progressive Web App
PWA - Progressive Web App
 
Introduction to Progressive Web Apps (PWA)
Introduction to Progressive Web Apps (PWA)Introduction to Progressive Web Apps (PWA)
Introduction to Progressive Web Apps (PWA)
 
Progressive web apps
Progressive web appsProgressive web apps
Progressive web apps
 
Progressive Web App
Progressive Web AppProgressive Web App
Progressive Web App
 
Introduction to Progressive Web App
Introduction to Progressive Web AppIntroduction to Progressive Web App
Introduction to Progressive Web App
 
Building a Progressive Web App
Building a  Progressive Web AppBuilding a  Progressive Web App
Building a Progressive Web App
 
Introduction of Progressive Web App
Introduction of Progressive Web AppIntroduction of Progressive Web App
Introduction of Progressive Web App
 
Progressive Web Apps / GDG DevFest - Season 2016
Progressive Web Apps / GDG DevFest - Season 2016Progressive Web Apps / GDG DevFest - Season 2016
Progressive Web Apps / GDG DevFest - Season 2016
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
Why Progressive Web App is what you need for your Business
Why Progressive Web App is what you need for your BusinessWhy Progressive Web App is what you need for your Business
Why Progressive Web App is what you need for your Business
 
Progressive Web Apps (PWAs): Why you want one & how to optimize them #Applaus...
Progressive Web Apps (PWAs): Why you want one & how to optimize them #Applaus...Progressive Web Apps (PWAs): Why you want one & how to optimize them #Applaus...
Progressive Web Apps (PWAs): Why you want one & how to optimize them #Applaus...
 
Progressive Web APP ( PWA )
Progressive Web APP ( PWA ) Progressive Web APP ( PWA )
Progressive Web APP ( PWA )
 
PWA
PWAPWA
PWA
 
Build progressive web apps with Angular
Build progressive web apps with AngularBuild progressive web apps with Angular
Build progressive web apps with Angular
 
Appium ppt
Appium pptAppium ppt
Appium ppt
 
Cross browser testing with browser stack
Cross browser testing with browser stackCross browser testing with browser stack
Cross browser testing with browser stack
 
Mobile App Screens UI UX Flowcharts Proposal PowerPoint Presentation Slides
Mobile App Screens UI UX Flowcharts Proposal PowerPoint Presentation SlidesMobile App Screens UI UX Flowcharts Proposal PowerPoint Presentation Slides
Mobile App Screens UI UX Flowcharts Proposal PowerPoint Presentation Slides
 
Progressive Web Apps and React
Progressive Web Apps and ReactProgressive Web Apps and React
Progressive Web Apps and React
 
Angular PWA
Angular PWAAngular PWA
Angular PWA
 

Semelhante a Progressive Web Apps

Progressive web app testing
Progressive web app testingProgressive web app testing
Progressive web app testingKalhan Liyanage
 
PWA basics for developers
PWA basics for developersPWA basics for developers
PWA basics for developersFilip Rakowski
 
Push notification to the open web
Push notification to the open webPush notification to the open web
Push notification to the open webAhmed Gamal
 
Service workers are your best friends
Service workers are your best friendsService workers are your best friends
Service workers are your best friendsAntonio Peric-Mazar
 
A year with progressive web apps! #DevConMU
A year with progressive web apps! #DevConMUA year with progressive web apps! #DevConMU
A year with progressive web apps! #DevConMUAntonio Peric-Mazar
 
The web - What it has, what it lacks and where it must go - Istanbul
The web - What it has, what it lacks and where it must go - IstanbulThe web - What it has, what it lacks and where it must go - Istanbul
The web - What it has, what it lacks and where it must go - IstanbulRobert Nyman
 
The web - What it has, what it lacks and where it must go - keynote at Riga D...
The web - What it has, what it lacks and where it must go - keynote at Riga D...The web - What it has, what it lacks and where it must go - keynote at Riga D...
The web - What it has, what it lacks and where it must go - keynote at Riga D...Robert Nyman
 
The web - What it has, what it lacks and where it must go
The web - What it has, what it lacks and where it must goThe web - What it has, what it lacks and where it must go
The web - What it has, what it lacks and where it must goRobert Nyman
 
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...Robert Nyman
 
progressive web app
 progressive web app progressive web app
progressive web appRAGINI .
 
Progressive web apps
Progressive web appsProgressive web apps
Progressive web appsSuraj Kumar
 
Progressive Web Applications - The Next Gen Web Technologies
Progressive Web Applications - The Next Gen Web TechnologiesProgressive Web Applications - The Next Gen Web Technologies
Progressive Web Applications - The Next Gen Web TechnologiesGeekNightHyderabad
 
Basic Understanding of Progressive Web Apps
Basic Understanding of Progressive Web AppsBasic Understanding of Progressive Web Apps
Basic Understanding of Progressive Web AppsAnjaliTanpure1
 
Service workers and their role in PWAs
Service workers and their role in PWAsService workers and their role in PWAs
Service workers and their role in PWAsIpsha Bhidonia
 
Progressive Web Apps for Education
Progressive Web Apps for EducationProgressive Web Apps for Education
Progressive Web Apps for EducationChris Love
 
PWA ( Progressive Web Apps ) - Sai Kiran Kasireddy
PWA ( Progressive Web Apps ) - Sai Kiran KasireddyPWA ( Progressive Web Apps ) - Sai Kiran Kasireddy
PWA ( Progressive Web Apps ) - Sai Kiran KasireddySai Kiran Kasireddy
 
SEMINAR (pwa).pptx
SEMINAR (pwa).pptxSEMINAR (pwa).pptx
SEMINAR (pwa).pptxBasitMir10
 

Semelhante a Progressive Web Apps (20)

Checklist for progressive web app development
Checklist for progressive web app developmentChecklist for progressive web app development
Checklist for progressive web app development
 
pwa-170717082930.pdf
pwa-170717082930.pdfpwa-170717082930.pdf
pwa-170717082930.pdf
 
Progressive web app testing
Progressive web app testingProgressive web app testing
Progressive web app testing
 
PWA basics for developers
PWA basics for developersPWA basics for developers
PWA basics for developers
 
Push notification to the open web
Push notification to the open webPush notification to the open web
Push notification to the open web
 
Service workers are your best friends
Service workers are your best friendsService workers are your best friends
Service workers are your best friends
 
A year with progressive web apps! #DevConMU
A year with progressive web apps! #DevConMUA year with progressive web apps! #DevConMU
A year with progressive web apps! #DevConMU
 
The web - What it has, what it lacks and where it must go - Istanbul
The web - What it has, what it lacks and where it must go - IstanbulThe web - What it has, what it lacks and where it must go - Istanbul
The web - What it has, what it lacks and where it must go - Istanbul
 
The web - What it has, what it lacks and where it must go - keynote at Riga D...
The web - What it has, what it lacks and where it must go - keynote at Riga D...The web - What it has, what it lacks and where it must go - keynote at Riga D...
The web - What it has, what it lacks and where it must go - keynote at Riga D...
 
The web - What it has, what it lacks and where it must go
The web - What it has, what it lacks and where it must goThe web - What it has, what it lacks and where it must go
The web - What it has, what it lacks and where it must go
 
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...
 
progressive web app
 progressive web app progressive web app
progressive web app
 
Progressive web apps
Progressive web appsProgressive web apps
Progressive web apps
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
Progressive Web Applications - The Next Gen Web Technologies
Progressive Web Applications - The Next Gen Web TechnologiesProgressive Web Applications - The Next Gen Web Technologies
Progressive Web Applications - The Next Gen Web Technologies
 
Basic Understanding of Progressive Web Apps
Basic Understanding of Progressive Web AppsBasic Understanding of Progressive Web Apps
Basic Understanding of Progressive Web Apps
 
Service workers and their role in PWAs
Service workers and their role in PWAsService workers and their role in PWAs
Service workers and their role in PWAs
 
Progressive Web Apps for Education
Progressive Web Apps for EducationProgressive Web Apps for Education
Progressive Web Apps for Education
 
PWA ( Progressive Web Apps ) - Sai Kiran Kasireddy
PWA ( Progressive Web Apps ) - Sai Kiran KasireddyPWA ( Progressive Web Apps ) - Sai Kiran Kasireddy
PWA ( Progressive Web Apps ) - Sai Kiran Kasireddy
 
SEMINAR (pwa).pptx
SEMINAR (pwa).pptxSEMINAR (pwa).pptx
SEMINAR (pwa).pptx
 

Mais de Software Infrastructure (20)

Kotlin
KotlinKotlin
Kotlin
 
NoSql
NoSqlNoSql
NoSql
 
Stream Analytics
Stream AnalyticsStream Analytics
Stream Analytics
 
Quartz Scheduler
Quartz SchedulerQuartz Scheduler
Quartz Scheduler
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Deep Learning
Deep Learning Deep Learning
Deep Learning
 
Java9
Java9Java9
Java9
 
Machine learning
Machine learningMachine learning
Machine learning
 
Raspberry PI
Raspberry PIRaspberry PI
Raspberry PI
 
Golang
GolangGolang
Golang
 
Codename one
Codename oneCodename one
Codename one
 
Hazelcast sunum
Hazelcast sunumHazelcast sunum
Hazelcast sunum
 
Microsoft bot framework
Microsoft bot frameworkMicrosoft bot framework
Microsoft bot framework
 
Blockchain use cases
Blockchain use casesBlockchain use cases
Blockchain use cases
 
The Fintechs
The FintechsThe Fintechs
The Fintechs
 
Server Side Swift
Server Side SwiftServer Side Swift
Server Side Swift
 
Push Notification
Push NotificationPush Notification
Push Notification
 
.Net Core
.Net Core.Net Core
.Net Core
 
Java Batch
Java BatchJava Batch
Java Batch
 
Big Data & Hadoop
Big Data & HadoopBig Data & Hadoop
Big Data & Hadoop
 

Último

Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsSachinPawar510423
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Solving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptSolving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptJasonTagapanGulla
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - GuideGOPINATHS437943
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgsaravananr517913
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm Systemirfanmechengr
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 

Último (20)

Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documents
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Solving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptSolving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.ppt
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - Guide
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm System
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 

Progressive Web Apps

  • 1. PWA Progressive Web Apps Yusuf Koraman - Software Infrastructure “A new way to deliver amazing user experiences on the web.”
  • 2. Summary 1. PWA , What? How? Who? 2. Browser Capabilities 3. Characteristics & Benefits 4. Architecture 1. Service Workers & Demo 2. Manifest File & Demo 3. Service Workers & Apis & Demo 5. Case Studies
  • 3. What’s PWA? Progressive Web App (PWA), in general, is a term used to denote web apps that use the latest web technologies Progressive Web Apps, also known as Installable Web Apps or Hybrid Web Apps This new application type attempts to combine features offered by most modern browsers with the benefits of mobile experience Progressive Web Apps are enabled by the Application Manifest and Service Workers standards by W3C.
  • 4. How PWA works? Minimum Requirements : Html, Css, Javascript. Depends on OS Web Site > Install Banner/ Properties > Add to Shortcut > Pwa working as a native/ hybrid apps. Ex : https://www.flipkart.com/
  • 5. Who? In 2015, designer Frances Berriman and Google Chrome engineer Alex Russell coined the term "Progressive Web Apps" to describe apps taking advantage of new features supported by modern browsers, including service workers and web app manifests, that let users upgrade web apps to progressive web applications in their native operating system (OS)
  • 6.
  • 7. Web or Native? “Browser Capabilities” chrome://settings/content http://caniuse.com/#search=bluetooth http://caniuse.com/#search=camera
  • 8. Characteristics ● Service workers allow work offline, or on low quality networks. ● A service worker, written in JavaScript, is like a client-side proxy and puts you in control of the cache and how to respond to resource requests. By pre-caching key resources you can eliminate the dependence on the network, ensuring an instant and reliable experience for your users. Reliable
  • 9. Fast 53% of users will abandon a site if it takes longer than 3 seconds to load! And once loaded, users expect them to be fast—no janky scrolling or slow-to-respond interfaces. Characteristics
  • 10. Characteristics Engaging Progressive Web Apps are installable and live on the user's home screen, without the need for an app store. They offer an immersive full screen experience with help from a web app manifest file and can even re-engage users with web push notifications. Characteristics
  • 11. Characteristics Progressive - Work for every user, regardless of browser choice. Responsive - Fit any form factor: desktop, mobile, tablet, or forms yet to emerge. App-like - Feel like an app to the user with app-style interactions and navigation. Fresh - Always up-to-date thanks to the service worker update process. Safe - Served via HTTPS to prevent snooping and ensure content hasn’t been tampered with. Discoverable - Are identifiable as “applications” thanks to W3C manifests[6] and service worker registration scope allowing search engines to find them. Re-engageable - Make re-engagement easy through features like push notifications. Installable - Allow users to “keep” apps they find most useful on their home screen without the hassle of an app store. Linkable - Easily shared via a URL and do not require complex installation. Characteristics
  • 12. Why build a Progressive Web App?
  • 13. Why build a Progressive Web App? Twitter Lite PWA Significantly Increases Engagement and Reduces Data Usage 65% increase in pages per session 75% increase in Tweets sent 20% decrease in bounce rate Nicolas Gallagher, the Engineering Lead for Twitter Lite, notes: Twitter Lite is now the fastest, least expensive, and most reliable way to use Twitter. The web app rivals the performance of our native apps but requires less than 3% of the device storage space compared to Twitter for Android.
  • 14. Why build a Progressive Web App? 25% higher revenue per article pageview 4X faster average page-load speed 43% longer average time on site 34% more page views per session 24% lower bounce rates
  • 15. Why build a Progressive Web App?  76% higher conversions across browsers  14% more monthly active users on iOS; 30% on Android  4X higher interaction rate from Add to Homescreen
  • 16. Why build a Progressive Web App? • Users time on site with Flipkart lite vs. previous mobile experience: 3.5 minutes vs 70 seconds. • 3x more time spent on site • 40% higher re-engagement rate • 70% greater conversion rate among those arriving via Add to Homescreen • 3x lower data usage
  • 17. Basic’s of PWA Progressive Web Apps are enabled by the Application Manifest and Service Workers standards by (World Wide Web Consortium (W3C)
  • 20. How can i understand a web site is PWA? "/b9af9805d4535bd3.png
  • 21. PWA Support & Light house https://developers.google.com/web/ilt/pwa/lighthouse-pwa-analysis-tool
  • 22. PWA Support & Light house
  • 23. PWA is a SPA? PWA != SPA
  • 24. Current Status The Safari (Apple) team has started work on serviceWorkers. PWAs running on Android are now actually installed locally and work like native apps WebUSB API is appearing with Chrome 61, giving web developers access to USB units navigator.share API enables triggering the native OS share menu Front end frameworks are rapidly evolving and maturing
  • 26. Application Shell Architecture The app "shell" is the minimal HTML, CSS and JavaScript required to power the user interface and when cached offline can ensure instant, reliably good performance to users on repeat visits. This means the application shell is not loaded from the network every time the user visits. Only the necessary content is needed from the network.
  • 27. Service Workers A service worker is a script that your browser runs in the background, separate from a web page, opening the door to features that don't need a web page or user interaction. Before service worker, there was one other API that gave users an offline experience on the web called AppCache. It's a JavaScript Worker, so it can't access the DOM directly. Service worker can communicate with the pages it controls by responding to messages sent via the postMessage interface, and those pages can manipulate the DOM if needed Service worker is a programmable network proxy, allowing you to control how network requests from your page are handled A service worker has a lifecycle that is completely separate from your web page.
  • 29. Update a service worker 1. Update your service worker JavaScript file. If there is even a byte's difference in the service worker file compared to what it currently has, it considers it new. 2. Your new service worker will be started and the install event will be fired. 3. At this point the old service worker is still controlling the current pages so the new service worker will enter a waiting state. 4. When the currently open pages of your site are closed, the old service worker will be killed and the new service worker will take control. 5. Once your new service worker takes control, its activate event will be fired.
  • 30. Service Worker - Update & Skip Waiting Use service worker tools, such as sw-precache, for example to reliably cache and update the service worker tha manages your static content.
  • 31. Security You need HTTPS During development you'll be able to use service worker through localhost, but to deploy it on a site you'll need to have HTTPS setup on your server. Using service worker you can hijack connections, fabricate, and filter responses. While you would use these powers for good, a man-in-the-middle might not.
  • 32. " Service Worker Registration " Check Lifecycle "Service Worker Caches "Lazy load & Static caches
  • 33. As of Chrome version 42, the Push API and Notification API are available to developers. Background sync is a new web API that lets you defer actions until the user has stable connectivity. This is useful for ensuring that whatever the user wants to send, is actually sent. Location : navigator.geolocation.getCurrentPosition(function(result){console.log(result);}) Full Screen : Fullscreen : document.body.webkitRequestFullscreen(); AppCache As of Chrome 50, the Geolocation API only works on secure contexts (HTTPS). If your site is hosted on a non-secure origin (such as HTTP), any requests for the user's location no longer function. Device orientation & Motion Fullscreen Experiences Click to Call Service Worker & APIs
  • 35. Push Notification & Client Side A PushSubscription contains all the information we need to send a push message to that user. You can "kind of" think of this as an ID for that user's device.
  • 36. Push Notifications & Client Side Push is based on service workers because service workers operate in the background. APIs: push is invoked when a server supplies information to a service worker; a notification is the action of a service worker or web page script showing information to a user. serviceWorkerRegistration.showNotification(title, options);
  • 37. Notification OnClick & Client Side const examplePage = '/demos/notification-examples/example-page.html';   const promiseChain = clients.openWindow(examplePage);   event.waitUntil(promiseChain); self.addEventListener('notificationclick', function(event) {   if (!event.action) {     // Was a normal notification click     console.log('Notification Click.');     return;   }
  • 38. Notification Permissions & Client Side function askPermission() {   return new Promise(function(resolve, reject) {     const permissionResult = Notification.requestPermission(function(result) {       resolve(result);     });     if (permissionResult) {       permissionResult.then(resolve, reject);     }   })   .then(function(permissionResult) {     if (permissionResult !== 'granted') {       throw new Error('We weren't granted permission.');     }   }); }
  • 39. Push Event on the User's Device Once we've sent a push message, the push service will keep your message on its server until one of following events occurs: 1. The device comes online and the push service delivers the message. 2. The message expires. If this occurs the push service removes the message from its queue and it'll never be delivered.
  • 40. Push Notification FAQs Can I change the push service a browser uses? No. The push service is selected by the browser and as we saw with the subscribe() call, the browser will make network requests to the push service to retrieve the details that make up the PushSubscription. Each browser uses a different Push Service, don't they have different API's? All push services will expect the same API. If I subscribe a user on their desktop, are they subscribed on their phone as well? Unfortunately not. A user must register for push on each browser they wish to receive messages on. It's also worth noting that this will require the user granting permission on each device.
  • 41. " Service Worker & Push Notifications
  • 42. Service Workers & Sync Background sync is a new web API that lets you defer actions until the user has stable connectivity. This is useful for ensuring that whatever the user wants to send, is actually sent. Register: // Then later, request a one-off sync: navigator.serviceWorker.ready.then(function(swRegistration) { return swRegistration.sync.register('myFirstSync'); }); Usage: self.addEventListener('sync', function(event) { if (event.tag == 'myFirstSync') { event.waitUntil(doSomeStuff()); } }); • You can only register for a sync event when the user has a window open to the site.
  • 44. Offline Storages For PWA Cache API : async IndexedDB : async Web Storage (LocalStorage and SessionStorage) : sync, has no Web Worker support and is size and type (strings only) limited. Cookies : have their uses but are synchronous & web worker support and are also size-limited. WebSQL : does not have broad browser support and its use is not recommended. The File System API : is not supported on any browser besides Chrome. Debugging support for IndexedDB is now available in Chrome(Application tab), Opera, Firefox (Storage Inspector) and Safari (see the Storage tab).
  • 45. How much can I store? "IndexedDB Max Sizes
  • 46. " Index DB Sample
  • 48. " Other APIs & Media Sample
  • 49. Manifest The web app manifest is a simple JSON file that gives you, the developer, the ability to control how your app appears to the user {   "short_name": "AirHorner",   "name": "Kinlan's AirHorner of Infamy",   "icons": [     {       "src": "launcher-icon-1x.png",       "type": "image/png",       "sizes": "48x48"     },     {       "src": "launcher-icon-2x.png",       "type": "image/png",       "sizes": "96x96"     },     {       "src": "launcher-icon-4x.png",       "type": "image/png",       "sizes": "192x192"     }   ],   "start_url": “index.html?launcher=true”, “background_color": “#2196F3”, “theme_color": “#2196F3”, “display": “standalone", “orientation": "landscape" } https://developer.mozilla.org/en-US/docs/Web/Manifest