SlideShare a Scribd company logo
1 of 49
PWA - native apps
power in web
Борис Могила
IG “RIA” (dom.ria.com - напрям “Новобудови України”)
PWA Native
HOUSING.com
Навіщо?
Джерело: comScore Mobile Metrix, U.S., Age 18+, June 2015
1000Порівняння найпопулярніших мобільних додатків та
1000 -найпопулярніших мобільних веб ресурсів
Швидкість
WEB PWA NATIVE
Offline підтримка
WEB PWA NATIVE
Доступ з головного
екрана
WEB PWA NATIVE
Push повідомлення
WEB PWA NATIVE
Demo time
Потреба завантаження
WEB PWA NATIVE
Розміщення в
app store
WEB PWA NATIVE
Шарінг і доступ по
посиланню
WEB PWA NATIVE
Не потрібно оновлювати
WEB PWA NATIVE
Twitter
● 65% приріст перегляду сторінок за сесію
● На 75% збільшилася кількість твітів
● На 20% зменшився показник відмов
AliExpress
● 104% нових користувачів
● 82% збільшення коефіцієнта конверсії на
iOS
● В 2 рази збільшилась кількість
переглянутих сторінок
● Тривалість перебування на сайті
збільшилась на 74%
Alibaba
● На 76% збільшилась кількість конверсій
● На 14% більше користувачів для IOS і на
30% для Andoid
● В 4 рази більше користувачів додають
додаток на головний екран
Основні принципи PWA
● Передача даних по протоколу HTTPS
● Адаптивний дизайн
● Як мінімум стартова сторінка
завантажується offline
● Описані дані для додавання на головний
екран
Основні принципи PWA
● Швидке завантаження навіть на
повільному інтернеті
● Кросбраузерність
● Перехід між сторінками без відчуття
завантаження
● Кожна сторінка повинна мати окремий url
Принципи PRPL
● Завантажити критичні ресурси для для
початкової сторінки
● Від малювати початкову сторінку
● Закешувати інші сторінки
● Ліниве завантаження інших сторінок за
потребою
Service worker
if ('serviceWorker' in navigator) {
navigator.serviceWorker
.register('/service-worker.js')
.then(registration => {
console.log('registred ->', registration.scope)
})
.catch(error => {
console.log('error->', error)
});
}
Встановлення
Життєвий цикл
Активація Помилка
Режим
очікування
Зупинка Push повідомлення /
Запит / Повідомлення
var CACHE_NAME = 'my-site-cache-v1';
var urlsToCache = [
'/',
'/styles/main.css',
'/script/main.js'
];
self.addEventListener('install', event => {
event.waitUntil(
caches.open(CACHE_NAME)
.then(cache => cache.addAll(urlsToCache))
);
});
Встановлення
self.addEventListener('activate', event => {
var cacheWhitelist = ['pages-cache-v1', 'blog-posts-cache-v1'];
event.waitUntil(
caches.keys().then(cacheNames => {
return Promise.all(
cacheNames.map(cacheName => {
if (cacheWhitelist.includes(cacheName)) return;
return caches.delete(cacheName);
})
);
})
);
});
Активація
self.addEventListener('fetch', event => {
event.respondWith(
caches.match(event.request)
.then(response => {
//ваша стратегія обробки запитів
})
)
});
Запит
Стратегії
1. Offline-first
2. Offline-second
3. Тільки кеш
4. Тільки з сервера
https://goo.gl/4RKJKd
Push notifications
1. Своєчасно
2. Чіткі
3. Доречні
https://goo.gl/RAHXHU
{
body: 'Here is a notification body!',
icon: 'images/example.png',
vibrate: [100, 50, 100],
data: {
dateOfArrival: Date.now(),
primaryKey: 1
},
actions: [
{action: 'explore', title: 'Explore this new world',
icon: 'images/checkmark.png'},
{action: 'close', title: 'Close notification',
icon: 'images/xmark.png'},
]
}
manifest.json
{
"name": "DOM.RIA",
"short_name": "DOM.RIA",
"icons": [
{
"src": "https://dom.riastatic.com/css/images/128x128.png",
"sizes": "128x128",
"type": "image/png"
},
…,
],
"start_url": start_url + '?utm_souce=homescreen',
"display": "standalone",
"background_color": "#ffffff",
"theme_color": "#f09213"
} https://goo.gl/qKjzEi
amp + service worker
<script async custom-element="amp-install-serviceworker" src="
https://cdn.ampproject.org/v0/amp-install-serviceworker-0.1.js">
</script>
<amp-install-serviceworker src="/sw.js"
data-iframe-src="/"
layout="nodisplay">
</amp-install-serviceworker>
Готові рішення
● sw-precache
● sw-toolbox
● React CLI
● Vue CLI
● Preact CLI
● Polimer CLI
1. https
2. Service worker лише з оригінального
домену
3. Статика з іншого домена
4. IOS і EDGE
5. scope на amp
Підводні камені
https://goo.gl/xpFQ4s Сторінка
Credential Management API
mobile
Demo time
Payment Request API
mobile
Web Bluetooth API
mobile
WebVR API
mobile
Web Share API
https://developers.google.com/web/progressive-web-apps/
https://developers.google.com/web/ilt/pwa/
https://www.youtube.com/user/ChromeDevelopers
https://whatwebcando.today/
https://serviceworke.rs/
Корисні посилання
site : https://boryamogila.github.io/
facebook: Boris Mogila
twitter: Borya Mogila
email: bora.mog@gmail.com,
Контактні дані
Дякую за увагу
Посилання на презентацію: https://goo.gl/Uu62AT

More Related Content

Featured

How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellSaba Software
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming LanguageSimplilearn
 

Featured (20)

How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
 

Pwa - native apps power in web

Editor's Notes

  1. 2 захода за 5 мин
  2. 1 push critical resources2 render initial route 3 pre-cache remaining routes 4 lazy-load and create remainig routes on demand
  3. Cross-origin resource sharing Access-Control-Allow-Origin Service-Worker-Allowed
  4. Web VR edge chrome android
  5. Web VR edge chrome android
  6. Web VR edge chrome android
  7. Web VR edge chrome android
  8. Web VR edge chrome android