DEV Community

VidyashreeTarikere
VidyashreeTarikere

Posted on

Why do we need Progressive web app?

Introduction
Mobile application development patterns can take several paths for its development. Mobile applications can be developed by building a native app which are platform dependent and run on a specific Operating System like Android and iOS.

Native applications as the name suggests are native to the device’s OS and therefore the code for an application needs to be done in different languages , as code in one language cannot be converted to another. Native apps altogether provide the user a better experience as these apps are built for a particular device. However, the cost involved in developing a particular app for different platforms could be a major disadvantage.

Another approach to develop a mobile application could be building a mobile based web app. The technology stack for a web app remains same as that of a traditional website. Web apps, however, unrestrict the platform dependency as in case of Native Apps.

Web apps are not platform dependent and are served via URL running on remote servers. Web apps are comparatively faster but they fail to provide an app like experience. Progressive Web App emerged as an optimal solution to provide the user with a native app like experience and offer the advantage of web applications.

Progressive web apps
Progressive web emerged as bridge between native app development as well as web application. Providing the best features of both the development pattern progress web provides the user with an app like experience by providing with an app icon as well as services like push notifications.

Progressive web apps run on browser just like a traditional web app but they are accessed via a app icon just like a native app. Progressive web app provide the user with a nice user experience even in very slow internet connection or no connection at all. PWA’s are much more secure as compared to native apps. PWAs can be employed in corporates just to reduce the cost of development of app for different platform.

Progressive web apps are responsive and connectivity independent in the sense that due to the technological stack used it is easily to make the app responsive as well as service worker ensure that the pages of apps are offline cached ensuring offline usage capability. Throughout the app development using progressiveness , HTTPS protocol is used which establish a secure connection.

A web app can be called a progressive web app if it possess the manifest file, service worker file. Manifest file provides the app with an app icon for an app like experience. Service worker is responsible for the provision all the app like features like push notifications service as well as offline functionality by using background synchronization. Service worker can be thought of as a servant for our application which wakes up when a service is called and perform the task. Thus when offline, service worker synchronize the background data and serve it to the user until a network is connected.

History
Although Google officially introduced the term Progressive Web Applications as a new standard in web development during Google’s IO conference in 2016, the concept can initially be attributed to Steve Jobs.

During the historic Apple iPhone launch of 2007, Jobs predicted that developers can build amazing web experiences using Web 2.0 and Ajax that look exactly like an application on iPhones.

But a year later, Apple introduced the App Store, and when Google also jumped into the app race with the Play store, the era of native apps dominating the mobile internet world began. These apps were fast, responsive, and ensured that the user had the best experience when looking for something online.

The concept of PWAs went into cold storage for a few years, before 2 Google Engineers, Alex Russel and Frances Berriman, observed a new class of websites that were delivering a much better UX than the traditional web sites.

They called these web applications “Progressive Web Applications” (PWAs for short) and Alex Russel called them “ Responsive, connectivity — independent, app-like, fresh, safe, discoverable,re-engageable, installable, linkable web-experiences.”

PWAs were initially supported by Android, Chrome OS, and Windows, and Apple announced support to PWA technology with the introduction of “Support Workers” in 2018.

Advantages of PWA:
Short or Near instantaneous loading time:
With PWAs, several elements of the web page are cached the first time you open it, meaning the loading time for a PWA is much lesser than a mobile-optimized website. In addition, PWAs don’t need the processing power or the storage of a native app, which means their interactive elements will respond immediately to clicks and other user gestures.
Functions with limited connectivity: For people who are still in the developing parts of the world such as the Middle East or Africa, Internet connectivity is a huge problem. But PWAs “Service Workers,” which are basically lines of Javascript code that enable it to have instant access to cached resources, means you can continue your browsing experience even when the network is slow, sketchy.

Better User Experience:
PWAs try and imitate the native app, which means they can provide similar functionalities as an app but with lesser resources. When you combine this with speed and the ability to deliver a good UX over slower connections, and users are bound to come back to PWAs.

Discoverability:
PWAs exist on the web, just like any other website, and they can easily be found via a search engine or a social share. Since you don’t need to go to a native app store to find, authenticate and install the application, it makes PWAs easier to integrate with your content and social strategies.

Easier Updates:
Since a PWA is not like a regular native app that requires you to manually install an update via the app store, updating a PWA is much easier and updates can be rolled out even without disturbing the user.

Use-cases of PWA:
Twitter: Twitter launched Twitter Lite, a PWA in 2017, which helped them connect with mobile users more deeply while consuming fewer data. The PWA relies on cached data and optimized images, and the Twitter lite PWA is just 600KB, compared to the 23.5 MB size of the native app available on the Play store.

Tinder: The now-infamous dating app also launched their PWA in 2017, and found that there was a higher user interaction with the PWA over the native app, with users spending more time messaging on the web application compared to the native app, along with increased session lengths and purchases in par with the native Tinder app.

Architectural pattern of PWA:
Architectural pattern of Progressive Web App is based on two core functionality which are Service workers and App Shell namely.

A. Application Shell App shell architectural pattern is followed for a PWA to be built. Certain local resources like the navigation bar as well as the home page of the app are loaded in the shell just to provide a skeleton of the application, when an offline request is made.

The dynamic content is the populated using JavaScript with the help of service workers. App shell architecture is one of the basic building block of progressive web apps along with service workers.

The sole purpose of this architecture is to instantly load the contents of the app. One main advantage of using this architecture is that app shell is not loaded every time the user visits. Some initial HTML is always in the hands of user when the device is not connected to the internet, thus offering the user with instant as well reliable performance. The app is filled with dynamic content afterwards whenever the user requests it.

It is the App shell that provides the progressive web app the features of the native apps. All the static content which remains same to an extent all over the application like the basic HTML layout, minimal CSS and JavaScript are contained in the app shell. This content an easily be cached and thus loaded instantly from the cache when the user repeatedly visits them. However, if an app is static without any functionalities like reaching out to the server or dynamically populating the view the app shell then consists of the whole content.

Top comments (0)