Skip to Content
만들면서 배우는 프로그레시브 웹 앱: 사용자 경험을 극대화하는 차세대 웹 앱 기술
book

만들면서 배우는 프로그레시브 웹 앱: 사용자 경험을 극대화하는 차세대 웹 앱 기술

by 한민주, 양찬석, 탈 아터
April 2019
Beginner to intermediate
368 pages
7h 18m
Korean
Hanbit Media, Inc.
Content preview from 만들면서 배우는 프로그레시브 웹 앱: 사용자 경험을 극대화하는 차세대 웹 앱 기술
10 사용자에게 푸시 알림 보내기
- 301
한 가지 작업이 남아 있습니다. 앱 서버 데이터베이스에 구독 세부 정보를 저장하
기 위한 서버 쪽 코드가 필요합니다. 이 부분을 구현하는 것은 앱이나 서버에 따라
그리고 서버에서 어떤 데이터 구조를 사용하고 어떻게 저장하는지에 따라 크게 달
라집니다. 하지만 기본 전제는 단순합니다. 보통 구독 세부정보는 사용자 테이블
이나 객체 저장소에 문자열 형태로 저장됩니다. 사용자에게 알림을 보내고 싶을
땐, 이 문자열을 읽어서 객체로 다시 변환해야 합니다.
server
/
index
.
js
server
/
subscriptions
.
js
에서 아주 간단하고 기본적
인 구현을 확인할 수 있습니다. 샘플 앱에는 ‘사용자’라는 컨셉이 없으므로
(
직 한 명의 사용자만 지원하기 때문에
)
, 모든 구독 정보를 사용자와의 연결없이 그냥
subscriptions
객체 저장소에 저장합니다. 물론 진짜 앱에서는 이렇지 않지요.
10.4
서버에서 푸시 이벤트 전송하기
이제 서버에서 사용자로 푸시 메시지를 보내는 데 필요한 모든 것이 갖춰졌습니다.
VAPID
비공개 키와 공개 키
VAPID
를 지원하는 브라우저에서 메시지에 서명하고 구독을 생성하는 데 사
용합니다.
GCM
API
서버 키와 발신인
ID
VAPID
를 아직 지원하지 않는 브라우저에서
VAPID
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

파이썬으로 웹 크롤러 만들기: 초간단 나만의 웹 크롤러로 원하는 데이터 가져오는 방법

파이썬으로 웹 크롤러 만들기: 초간단 나만의 웹 크롤러로 원하는 데이터 가져오는 방법

한선용, 라이언 미첼

Publisher Resources

ISBN: 9791162248737