ionic-team / ionic-pwa-toolkit

Build lightning fast Progressive Web Apps with zero config and best practices built-in. Go from zero to production ready with Ionic and Stencil (Web Components).
MIT License
635 stars 74 forks source link

what is the difference between ionic-pwa-toolkit and ionic 4 + service worker enabled? #88

Closed voordev closed 5 years ago

voordev commented 6 years ago

I find the documentation very unclear on the differences between PWAs toolkit and and ionic 4 with service worker enabled.

Could someone point out the difference perhaps here and in the docs?

The documentation states that adding the service worker to index.html converts an ionic app to a 'pwa' but then this PWA Toolkit creates another project in different format.

For example using ionic serve does not work one a project generated with the PWA Toolkit. Thus, also ionic serve -c to testdrive the mobile part of the PWA does not work on a mobile.

Very unclear hope someone could share some more light on this. Im sure im not the only one.

Then not add, capicitator is part of PWA Toolkit but also a standalone project that can be integrated in other projects? Thus, is capicitator part of the PWA Toolkit?

ivaylo-mobile-dev commented 6 years ago

Hi voordev,

The PWA toolkit builds Progressive Web App right out of the box. Now a PWA has the following features:

Ionic 4 with service worker enabled would be an ionic app that is cached by service worker and can be accessed and used offline or with poor internet connection.

Josh Morony explains Capacitor in his book Building Mobile Apps with Ionic and Angular:

Capacitor allows you to wrap your web based application in a native shell, and acts as a bridge to the native device. Capacitor will create a native application for each platform you are targeting (e.g. iOS and Android), it will set up a web view in that application, and then it will load your web application into that web view. The end result is a native application (that looks no different to any other native mobile application) that is running your web code.

So Capacitor is not part of the PWA toolkit. You would use Capacitor or PhoneGap to build an app for the app stores using mostly the same code as for building the PWA.

badpenguin commented 5 years ago

@voordev ionic 4 are web components build with stencil that can be used on Angular, and hopefully React and VUE; probably you've used them in an angular project. This toolkit instead, actually it seems more a boilerplate honestly, uses stencil components directly. For PWA i think it will be better to use google workbox directly.

enaizi commented 5 years ago

Try google workbox. https://github.com/enaizi/pwa-sidemenu. Already configured with google workbox.

jayparmar commented 5 years ago

May be this will help https://ionicthemes.com/tutorials/about/the-complete-guide-to-progressive-web-apps-with-ionic4

voordev commented 5 years ago

Very clear. Thank you to all contributions. I forgot to close the issue. Hope it contributes to future reference