I would like to know more about PWAs below are the questionnaire point.
Any help would be appreciated! Thanks.
Solved! Go to Solution.
What is Progressive Web Apps ?
Why PWA?
This answer also covers - Installation of Magento 2.3 with PWA
Let's take an example of Flipkart
Flipkart, India’s largest e-commerce site, decided to combine their web presence and native app into a Progressive Web Application that has resulted in a 70% increase in conversions
Approach
New Progressive Web App helps Flipkart boost conversions 70%
Flipkart also works on Offline mode
BUT... BUT... BUT...
What is the Magento PWA Studio?
The Magento PWA Studio project provides the following tools:
pwa-buildpack -
Buildpack is a set of Webpack plugins and tools which is used for development of Magento PWA themes.
It is also used to setup and configure local development environment for Magento 2 platform.
It contains the following tools:
Peregrine - Peregrine is a set of React components created to handle Magento-specific functionalities like routing, root-components, layout handler, product lists, price display, etc.
Venia theme - venia-concept is a demo theme created by Magento using the Magento PWA studio. It showcases all currently available functionality, workflow and pages
PWA Studio is NOT
A New release of Magento
A Replacement of all front-end
A Desktop Application
Tools & Libraries used in PWA Studios
Page Shell
Total size is bigger (i. e. dashboard content is in dashboard-1234.js and 4567.js)
App takes longer to be offline ready.
Initial load requests only two files: login.html, login-2345.js
Initial load needs to load: Shell + content
The shell + content is visible earlier than with App Shell approach.
A hybrid approach can be used where shell and content is separated in two requests (see admin page as example). This makes sense when content is much bigger than shell and shell should be visible earlier.
GraphQL in Magento
Authentication and Schema
Reducing amount of Front-end Queries
Phase Render
Desktop Browser compatibility
Mobile Browser compatibility
Not supported: Android Webview, IE, Safari
PWAs are More Secure
PWA - Offline Mode
offline Wikipedia application is a good example of a PWA that uses an app shell model.
Progressive Web App is the future of web development without any doubt. In the future, e-commerce sites, restaurants, and media sources will transition from native app to Progressive Web App. However, still in the initial phase, many of the developers would be actively looking for ways to make most out of the opportunities given by PWAs.
Lets start with Magento 2.3 installation with PWA
1. Enter the following command in DIR /var/www/html/ (m203 is my Magento 2.3 directory):
composer create-project --repository=https://repo.magento.com/ magento/project-community-edition=2.3.* --stability=beta m203
2. Install Magento by Command Line:
bin/magento setup:install --base-url=http://localhost/m230 --db-host=localhost --db-name=m230 --db-user=root --db-password=root --backend-frontname=admin --admin-firstname=admin --admin-lastname=admin --admin-email=admin@admin.com --admin-user=admin --admin-paassword=admin123 --language=en_US --currency=USD --timezone=America/Chicago --use-rewrites=1
3. Create base pwa theme which will be the parent them for PWA Venia theme.
4. Create directory app/design/frontend/Magento/pwa and copy all files and directories of base theme here.
Lets check base theme is available or not.
Run: php bin/magento setup:upgrade
5. Download PWA studio project.
6. Navigate to your Magento installation’s root directory and create a Pwa symlink folder linking to the project’s module directory(pwa-studio/packages/pwa-module).
from this directory i ran my command - /var/www/html/m230
This is a directory where my pwa downloaded source is /var/www/html/PWA/
ln -s /var/www/html/PWA/pwa-studio-master/packages/pwa-module app/code/Magento/Pwa
7. Link theme directory as well.Navigate to your Magento installation’s root directory and create a Pwa symlink folder linking to the project’s module directory(pwa-studio/packages/venia-concept).
ln -s /var/www/html/PWA/pwa-studio-master/packages/venia-concept app/design/frontend/Magento/venia
8. Now navigate to your pwa-studio project’s venia-concept directory, copy .env.dist into a new .env file and update the variables with the URL to your Magento development store.
cd /var/www/html/PWA/pwa-studio-master/packages/venia-conceptcp .env.dist .env
9. Install venia theme and Pwa Module:
run: php bin/magento setup:upgrade
we can see the venia theme is installed successfully.
10. Configure venia theme from admin->Content->Configuration
11. Navigate to path (/var/www/html/PWA/pwa-studio-master) run:
npm install
or
npm install webpack-dev-server -g
12. And Finally Navigate to /var/www/html/PWA/pwa-studio-master/packages/venia-concept
npm start
Congratulations! You have set up your development environment for the Venia theme project.
What is Progressive Web Apps ?
Why PWA?
This answer also covers - Installation of Magento 2.3 with PWA
Let's take an example of Flipkart
Flipkart, India’s largest e-commerce site, decided to combine their web presence and native app into a Progressive Web Application that has resulted in a 70% increase in conversions
Approach
New Progressive Web App helps Flipkart boost conversions 70%
Flipkart also works on Offline mode
BUT... BUT... BUT...
What is the Magento PWA Studio?
The Magento PWA Studio project provides the following tools:
pwa-buildpack -
Buildpack is a set of Webpack plugins and tools which is used for development of Magento PWA themes.
It is also used to setup and configure local development environment for Magento 2 platform.
It contains the following tools:
Peregrine - Peregrine is a set of React components created to handle Magento-specific functionalities like routing, root-components, layout handler, product lists, price display, etc.
Venia theme - venia-concept is a demo theme created by Magento using the Magento PWA studio. It showcases all currently available functionality, workflow and pages
PWA Studio is NOT
A New release of Magento
A Replacement of all front-end
A Desktop Application
Tools & Libraries used in PWA Studios
Page Shell
Total size is bigger (i. e. dashboard content is in dashboard-1234.js and 4567.js)
App takes longer to be offline ready.
Initial load requests only two files: login.html, login-2345.js
Initial load needs to load: Shell + content
The shell + content is visible earlier than with App Shell approach.
A hybrid approach can be used where shell and content is separated in two requests (see admin page as example). This makes sense when content is much bigger than shell and shell should be visible earlier.
GraphQL in Magento
Authentication and Schema
Reducing amount of Front-end Queries
Phase Render
Desktop Browser compatibility
Mobile Browser compatibility
Not supported: Android Webview, IE, Safari
PWAs are More Secure
PWA - Offline Mode
offline Wikipedia application is a good example of a PWA that uses an app shell model.
Progressive Web App is the future of web development without any doubt. In the future, e-commerce sites, restaurants, and media sources will transition from native app to Progressive Web App. However, still in the initial phase, many of the developers would be actively looking for ways to make most out of the opportunities given by PWAs.
Lets start with Magento 2.3 installation with PWA
1. Enter the following command in DIR /var/www/html/ (m203 is my Magento 2.3 directory):
composer create-project --repository=https://repo.magento.com/ magento/project-community-edition=2.3.* --stability=beta m203
2. Install Magento by Command Line:
bin/magento setup:install --base-url=http://localhost/m230 --db-host=localhost --db-name=m230 --db-user=root --db-password=root --backend-frontname=admin --admin-firstname=admin --admin-lastname=admin --admin-email=admin@admin.com --admin-user=admin --admin-paassword=admin123 --language=en_US --currency=USD --timezone=America/Chicago --use-rewrites=1
3. Create base pwa theme which will be the parent them for PWA Venia theme.
4. Create directory app/design/frontend/Magento/pwa and copy all files and directories of base theme here.
Lets check base theme is available or not.
Run: php bin/magento setup:upgrade
5. Download PWA studio project.
6. Navigate to your Magento installation’s root directory and create a Pwa symlink folder linking to the project’s module directory(pwa-studio/packages/pwa-module).
from this directory i ran my command - /var/www/html/m230
This is a directory where my pwa downloaded source is /var/www/html/PWA/
ln -s /var/www/html/PWA/pwa-studio-master/packages/pwa-module app/code/Magento/Pwa
7. Link theme directory as well.Navigate to your Magento installation’s root directory and create a Pwa symlink folder linking to the project’s module directory(pwa-studio/packages/venia-concept).
ln -s /var/www/html/PWA/pwa-studio-master/packages/venia-concept app/design/frontend/Magento/venia
8. Now navigate to your pwa-studio project’s venia-concept directory, copy .env.dist into a new .env file and update the variables with the URL to your Magento development store.
cd /var/www/html/PWA/pwa-studio-master/packages/venia-conceptcp .env.dist .env
9. Install venia theme and Pwa Module:
run: php bin/magento setup:upgrade
we can see the venia theme is installed successfully.
10. Configure venia theme from admin->Content->Configuration
11. Navigate to path (/var/www/html/PWA/pwa-studio-master) run:
npm install
or
npm install webpack-dev-server -g
12. And Finally Navigate to /var/www/html/PWA/pwa-studio-master/packages/venia-concept
npm start
Congratulations! You have set up your development environment for the Venia theme project.
What a fabulous R&D and explanation about magento PWAs.
I have a some question related to your replay.
Who is invented native PWA? google invented native PWA?
And in magento PWA studio use native PWA?
What are will affect after PWAs in magento?
Thanks!
first native PWA - This is the first time I heard this.
To my knowledge only PWA is available and Im not aware of sub sections.
Google coined PWA and PWA studio helps to build PWA storefront for magento.
Note: Magento builds PWA studio in collaboration with Google.
PWA's gives App like experience for mobile users but the developer still build a website.
PWA magento would be faster than theme based magento, PWA will be need API's to communicate to magento. All customisation need to have API support either REST or Graphql.
If you still have doubts please refer https://magento-research.github.io/pwa-studio/