Nomad Kim 2021. 8. 1. 18:29

PWA

Progressive Web Apps are web apps that use emerging web browser APIs and features along with traditional progressive enhancement strategy to bring a native app-like user experience to cross-platform web applications. Progressive Web Apps are a useful design pattern, though they aren't a formalized standard. PWA can be thought of as similar to AJAX or other similar patterns that encompass a set of application attributes, including use of specific web technologies and techniques. 

 

์กฐ๊ฑด

 

  1. responsive web degisn: ์ปจํ…์ธ ๊ฐ€ ๋ณด์—ฌ์ฃผ๋Š” ๊ธฐ๊ธฐ์— ๋”ฐ๋ผ ์œ ๋™์ ์œผ๋กœ ๊ทธ๋ฆฌ๊ณ  ๋ฐ˜์‘์ ์œผ๋กœ ๋ณด์—ฌ์ค„ ๊ฒƒ.
  2. service workers ๋ฅผ ์ด์šฉํ•  ๊ฒƒ
  3. app manifest ์™€ push notification ์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์„ ๊ฒƒ.
  4. ์‚ฌ์šฉ์ž๋“ค์ด app ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ฒ˜๋Ÿผ ๋Š๋‚„ ์ˆ˜ ์žˆ๋„๋ก, ๋‹ค์–‘ํ•œ ๋ธŒ๋ผ์šฐ์ € api ๋ฅผ ์ด์šฉํ•ด๊ตฌํ˜„ํ•  ๊ฒƒ.
  5. ์‚ฌ์šฉ๋“ค์˜ device ์— ์„ค์น˜๊ฐ€ ๊ฐ€๋Šฅํ•˜๋„๋ก ๋งŒ๋“ค ๊ฒƒ.

  In order to call a Web App a PWA, technically speaking it should have the following features: 

  • Secure contexts (HTTPS): The web application must be served over a secure network. Being a secure site is not only a best practice, but it also establishes your web application as a trusted site especially if users need to make secure transactions. Most of the features related to a PWA such as geolocation and even service workers are available only once the app has been loaded using HTTPS.
  • one or more Service Workers:  a script that allows intercepting and control of how a web browser handles its network requests and asset caching. With service workers, web developers can create reliably fast web pages and offline experiences.
  • manifest file: A JSON file that controls how your app appears to the user and ensures that progressive web apps are discoverable. It describes the name of the app, the start URL, icons, and all of the other details necessary to transform the website into an app-like format.

PWA advantages

PWAs should be discoverable, installable, linkable, network independent, progressive, re-engageable, responsive, and safe. To find out more about what these mean, read Progressive web app advantages.

 

example on iphone

 

Let's make PWA:

: https://youtu.be/FEBkne7Nyu4?t=558

 

  • PWA Builder: ์›น ์„œ๋น„์Šค๊ฐ€ PWA ์ ์šฉ์ด ๊ฐ€๋Šฅํ•œ์ง€ ํ…Œ์ŠคํŠธ ๋ฐ ๋ถ€์กฑํ•œ ๋ถ€๋ถ„์„ ์ž๋™์œผ๋กœ ์ฑ„์›Œ์ฃผ์–ด PWA ๋กœ ๋งŒ๋“ค ์ˆ˜ ์žˆ๊ฒŒ ๋„์™€์ฃผ๋Š” ์˜คํ”ˆ์†Œ์Šค 
  • Workbox: service worker ๋ฅผ ์ž๋™์œผ๋กœ ๋งŒ๋“ค์–ด์ฃผ๋Š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ 
  • ngrok: ๋กœ์ปฌํ˜ธ์ŠคํŠธ url ์„ ์™ธ๋ถ€์—์„œ ์ ‘๊ทผ์ด ๊ฐ€๋Šฅํ•œ url ๋กœ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋‹ค. (http, https)
  • Maskable.app: PWA ์•„์ด์ฝ˜ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋Š” ํˆด

์ฐธ๊ณ 

PWA (Progressive Web App) ๊ฐœ๋…๊ณผ ๋”ฐ๋ผ๋งŒ๋“ค๊ธฐ: https://www.youtube.com/watch?v=FEBkne7Nyu4