phonegap / phonegap-roadmap

Upcoming milestones and projects for PhoneGap
4 stars 6 forks source link

Progressive Web App Support #180

Open mwbrooks opened 7 years ago

mwbrooks commented 7 years ago

Description

Play around with Progressive Webs Apps (PWA) support in PhoneGap, understand what that might mean, and what we can leverage to improve the app development experience of PhoneGap.

Follow

hollyschinsky commented 7 years ago

PWA+Cordova Template repo (work in progress)

macdonst commented 7 years ago

Researched Issue #1 and determined that service workers will not function correctly on cordova-android unless we write a plugin or make big changes to cordova-android itself.

hollyschinsky commented 7 years ago

Short video demonstrating Progressive Web App - Add to Homescreen feature.

https://www.youtube.com/watch?v=EhVvbwtzVV4

hollyschinsky commented 7 years ago

Short video demonstrating Progressive Web App - Service Worker Caching feature. https://www.youtube.com/watch?v=23Sno5DnkQU

Description: Demonstrates how you can cache the app shell assets using a service worker to enhance performance and provide a better offline experience.

image

The service worker code that caches the assets is here.

macdonst commented 7 years ago

Notes from today's call:

Consensus has been reached on the following approach.

  1. Create PWA template
  2. Template includes phonegap-plugin-pwa
  3. PWA plugin includes only dependencies on new plugins to implement PWA API's, wrapper plugins of Cordova plugins or just a Cordova plugin.

Initially we'll start with a single PWA template but we'll eventually support multiple templates.

For now we will target cordova-ios and the Chrome browser as targets for our PWA support. We will let user feedback drive cordova-android adoption of PWA support for that platform.

Also, it looks like we should create a cordova-pwa platform so that users can continue to use cordova-browser as a test platform. Lack of the platform should not prevent us from moving forward on other elements of PWA support.

A review of existing plugins will commence and individuals issues per plugin will be created in phonegap-plugin-pwa so that everyone can contribute.

anuj-njoshi commented 6 years ago

how does pwa work with cordova plugins like cordova-file-opner2,cordova -sqlite2, cordova-sqlite-storage this are not supporting to browser.

macdonst commented 6 years ago

@anuj-njoshi for plugins that don't have an API in the browser we will suggest to the plugin authors to add browser platform support.