Progressive web app

Progressive Web App (PWA) is a term used to denote web apps that use the latest web technologies. Progressive web apps are technically regular web pages (or websites) but can appear to the user like traditional applications or (native) mobile applications. This new application type attempts to combine features offered by most modern browsers with the benefits of mobile experience.

Background

Since around 2005 web development technologies have shifted from static to dynamic documents driven by server (PHP, ASP.NET) and client side (e.g. Ajax [1]) tools, and responsive web design.[2] Despite an early push for web-based apps based on these technologies on devices such as the 2007 iPhone, attempts at web-apps failed by comparison to native-apps. Native apps provided a better user experience and booted faster compared to having to load in a browser at runtime. Packaged resources and direct access to hardware allowed native apps to perform much faster and to provide more features. By the mid 2010s, however, continued enhancements in HTML5, CSS3, and JavaScript, significantly more capable and standards compliant web browsers, along with powerful processors such as the A10 and Snapdragon 821 made performant hybrid-apps a viable alternative.

Hybrid Apps

Hybrid apps mimic the native mobile UX, and need an App store download. As such they consume storage. The combination of markup, styling sheets, and scripts enabled custom interactive page elements without use of closed systems such as Flash. Partially running in a mobile browser, hybrids did not have a URL, supported a rich User interface and access to system capabilities. Newly released CSS3 and JavaScript frameworks allowed new design patterns such as the box model followed by grids and flex, accompanied by translations, transformations, animations.

Characteristics

In 2015, designer Frances Berriman and Google Chrome engineer Alex Russell coined the term "Progressive Web Apps" [3] to describe apps taking advantage of new features supported by modern browsers, including service workers and web app manifests, that let users upgrade web apps to progressive web applications in their native operating system (OS). According to Google Developers,[3][4][5] these characteristics are:

Progressive Web Apps described by Shoaib in a follow-up post:[7] are an enhancement of existing web technology. As such, they do not require separate bundling or distribution. Publication of a Progressive Web App is as it would be for any other web page. As of 2017, Progressive Web Apps are supported by the Chrome browser, but more browsers may support the features needed in the future.

The technical baseline criteria for a site to be considered a Progressive Web App by browsers were described by Russell in a follow-up post:[8]

Technologies

Commonly used technologies used to create progressive web apps[9][10][11] are the following:

Manifest

The web app manifest is a W3C specification defining a JSON-based manifest[6] to provide developers a centralized place to put metadata associated with a web application including:

By setting and manipulating the metadata for the web manifest file, developers enable user agents to create seamless native-like mobile experiences through the Progressive Web App.

Service Workers

Native mobile apps deliver rich experiences and high performance, purchased at the expense of storage space, lack of real-time updates, and low search engine visibility. Traditional web apps suffer from the inverse set of factors: lack of a native compiled executable, along with dependence on unreliable and potentially slow web connectivity. Service Workers are used in an attempt to give progressive web apps the best of both these worlds[12].

Technically, Service Workers provide a scriptable network proxy in the web browser to manage the web/HTTP requests programmatically. The Service Workers lie between the network and device to supplement the content. They are capable of using the cache mechanisms efficiently and allow error-free behavior during offline periods.

Properties of Service Workers

  1. Trigger and keep alive by the relationship to the events, not by the documents
  2. Generic in nature
  3. Event-driven with time limit scripting contexts and running at the origin
  4. With natural endpoints for a wide range of runtime services
  5. Have a state
  6. With a script URL
  7. Containing registration
  8. Allocated ID or UUID
  9. With lifecycle events
  10. Have script resource map
  11. Can skip waiting for the flags

Benefits of Service Workers

Application Shell Architecture

For rapid loading, service workers store the Basic User Interface or "shell" of the RWD web application. This shell provides an initial static frame, a layout or architecture into which content can be loaded progressively as well as dynamically, allowing users to engage with the app despite varying degrees of web connectivity. Technically, the shell is a code bundle stored locally in the browser cache of the mobile device.[13]

Cost of a Progressive Web App

For an app publisher, the biggest advantage is the cost saving in terms of app development and maintenance. It costs 10 times lesser than a native application. [14]

Progressive Web App Examples

Progressive web app development

References

  1. ↑ Garrett, Jesse James. "Ajax: A New Approach to Web Applications". Retrieved February 18, 2005.
  2. ↑ Marcotte, Ethan. "Responsive Web Design". Retrieved May 25, 2010.
  3. 1 2 Russell, Alex. "Progressive Web Apps: Escaping Tabs Without Losing Our Soul". Retrieved June 15, 2015.
  4. ↑ "Your First Progressive Web App | Web Fundamentals - Google Developers". Your First Progressive Web App | Web Fundamentals - Google Developers. Retrieved 2016-07-17.
  5. ↑ Google Developers. "Progressive Web App". Retrieved June 15, 2015.
  6. 1 2 W3C “Web App Manifest”, Working Draft, retrieved 12 September 2016
  7. ↑ "Is It Right Time to Go for Progressive App Development". Retrieved Feb 20, 2016.
  8. ↑ Russell, Alex. "What, Exactly, Makes a Progressive Web App". Retrieved October 18, 2016.
  9. ↑ "Discoverable". Mozilla Developer Network. Retrieved 2017-04-24.
  10. ↑ "Network independent". Mozilla Developer Network. Retrieved 2017-04-24.
  11. ↑ "Instant Loading Web Apps with an Application Shell Architecture". Google Developers. Retrieved 2017-04-24.
  12. ↑ "Learn Everything About Progressive Web Apps".
  13. ↑ "Progressive Web Apps – a Quality Mix of Web and Mobile".
  14. ↑ "Why Progressive Web Apps (PWA) is not good news for Native and Hybrid app developers". Techathlon. 2017-06-14. Retrieved 2017-06-24.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.