Difference between revisions of "Progressive Web App"

From MgmtWiki
Jump to: navigation, search
(Problems)
(Solution)
Line 13: Line 13:
 
==Solution==
 
==Solution==
 
One solution to these problems is the [https://en.wikipedia.org/wiki/Progressive_web_applications Progressive Web App] ( PWA ). It is all about an app that uses resources from a modern Web Browser to present a similar experience the user would have with native/hybrid apps, but are built using HTML, CSS and JavaScript rather than with the native code for the platform from Apple, Android or Microsoft. (Note that TypeScript may also be used for a [[Web App]], but that just compiles into JavaScript.)
 
One solution to these problems is the [https://en.wikipedia.org/wiki/Progressive_web_applications Progressive Web App] ( PWA ). It is all about an app that uses resources from a modern Web Browser to present a similar experience the user would have with native/hybrid apps, but are built using HTML, CSS and JavaScript rather than with the native code for the platform from Apple, Android or Microsoft. (Note that TypeScript may also be used for a [[Web App]], but that just compiles into JavaScript.)
 +
 +
Many web developers already have been creating [[Web Site]]s that are well adapted to mobile devices and could already be considered to be constructed to look like [[Web App]]s. The extra work to enable these apps to be registered to display on the user's home screen (i.e. to become a PWA) is not large.
  
 
The [[Progressive Web App]] is a [[Web App]] that has an [[Web App Manifest]] and typically addresses these 10 key concepts, based on Google’s Patterns.
 
The [[Progressive Web App]] is a [[Web App]] that has an [[Web App Manifest]] and typically addresses these 10 key concepts, based on Google’s Patterns.

Revision as of 16:46, 18 May 2019

Full Title or Meme

A Progressive Web Application (PWA) runs in a browser on the user's device with the look and feel of a Native App.

Context

  • Folks all around the world are increasing dependent on their mobile phone for a wide range of functionality.
  • While all the newest Smart Phones come with multiple gigabytes of memory, most of the world still depends on less expensive phones. These phones cannot load large Native Apps nor can they store very many apps.
  • Out of scope is any technology that needs to package executable files, whether it is a .apk, .exe, or any other that needs to be downloaded as a Native App and installed on the user’s device.

Problems

  • Most Smart Phone users have some experience with accessing Web Apps, and during this access you may have noticed that most of the time they were slow and heavy, making the experience frustrating and disheartening.

The main point here is that any app from the store needs to be native or hybrid, which means, you must install it on your device and accept terms and conditions before you even try it. Let’s face it, it can be very frustrating, after all, having to install and uninstall several apps, or even install it for just one time usage is not something very practical. We must also consider that mobile Internet can be expensive and somehow limited, so if you need to download a 30 MB app, it will take a while and you risk running out of available connection.

Solution

One solution to these problems is the Progressive Web App ( PWA ). It is all about an app that uses resources from a modern Web Browser to present a similar experience the user would have with native/hybrid apps, but are built using HTML, CSS and JavaScript rather than with the native code for the platform from Apple, Android or Microsoft. (Note that TypeScript may also be used for a Web App, but that just compiles into JavaScript.)

Many web developers already have been creating Web Sites that are well adapted to mobile devices and could already be considered to be constructed to look like Web Apps. The extra work to enable these apps to be registered to display on the user's home screen (i.e. to become a PWA) is not large.

The Progressive Web App is a Web App that has an Web App Manifest and typically addresses these 10 key concepts, based on Google’s Patterns.

  1. Safe – It must use the HTTPS protocol to protect the privacy and integrity of the exchanged data.
  2. Progressive – It must work for all the users, regardless of which browser is used, because the app should be built using progressive enhancement patterns.
  3. Responsible – It must fit on any screen size: desktop, mobile phones, tablets, etc.
  4. Internet-free – With Service Worker (background task) technology it is possible to access the application on bad quality connections or even offline.
  5. App-like – User should have the same experience as any other native/hybrid application; this is because of the app shell model.
  6. Always up to date – User should not download any updates. Since it is a web site, all the updates must happen in the background.
  7. Detectable – It must be identified as “application”. Thanks to W3C manifest and a proper Service Worker registry it is possible to allow the search engines to find them.
  8. Re-engageble – It should increase the engagement by push notification to bring the user back.
  9. Installable – It must allow the user to create a shortcut on his initial desktop with a personalized icon, without any resources from the store.
  10. Shareable – It must be easy to be shared with only its URL to anybody and it must keep being easy to install.

Following those patterns, you will ensure that your application works very well, not only when accessed by a browser, but also by a shortcut icon.

PWA does not need any installation, you just need to access the web site and create a shortcut. You do not have to concern yourself about the development and management like it is done for iOS, Android and Windows, but you must pay attention to browser support. Currently, iOS does not support everything; in that case, you must find another solution, like the appCache missing, which should be used for offline access. You may verify the iOS ‘s full support for Service Workers here.

And how is all this possible? Thanks to an event oriented script called Service Workers, which is executed by the browsers that support it. Even with a site running offline, you will be receiving push notifications, geolocation, background updates, interceptions and images cache, JavaScript, CSS files, XHR, etc. This script works like a set of functionalities.

Some Down Sides to PWA

  • The Service Worker does not have access to DOM, it runs on a different scope from the page, it is promise based, and it must run with HTTPS protocol.

What Progressive Web Apps is not? Any technology that needs to package executable files, whether it is a .apk, .exe, or any other that needs to be downloaded from the App Store and installed on the user’s device.

References


Other References