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

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

by 한민주, 양찬석, 탈 아터
April 2019
Beginner to intermediate
368 pages
7h 18m
Korean
Hanbit Media, Inc.
Content preview from 만들면서 배우는 프로그레시브 웹 앱: 사용자 경험을 극대화하는 차세대 웹 앱 기술
242 - 프로그레시브 웹 앱
자는 여러 윈도우 창을 열어두고 각 창마다 다른 주식 시세를 살펴보는 경향이 있
습니다. 따라서 열려 있는 모든 윈도우 창은 데이터 스트림을 유지하고 있어야 합
니다. 앱을 최적화하고 대역폭과 서버 비용을 절약하기 위해 개별 창에서 스트림
을 여는 대신, 서비스 워커에서 모든 주가 변동 사항에 대한 단일 데이터 스트림만
여는 방식으로 앱을 개선할 수 있습니다. 각 페이지는 페이지가 열릴 때 서비스 워
커에 메시지를 전달하여 어떤 종류의 주식 업데이트를 받고 싶은지 알리고, 서비
스 워커는 해당 주식에 대한 업데이트를 원하는 클라이언트
ID
목록을 유지합니
다. 이제 스트림을 통해 특정 주식이 업데이트될 때, 서비스 워커는 이 주식에 관
심을 가지는 클라이언트 리스트를 확인하고,
clients
.
get()
을 사용하여 각 클
라이언트에 업데이트 된 주식 정보를 담아 메시지를 보낼 수 있습니다.
8.4
MessageChannel로 커뮤니케이션 채널을 열어두기
지금까지
WindowClient
혹은 서비스 워커 객체가 메시지를 게시하는 방법
및
postMessage()
가 받는 첫 번째 파라미터에 대해 살펴보았습니다. 하지만
postMessage()
는 양측 간의 통신 라인을 열어두고 메시지를 주고받는 데 사용
할 수 있는 두 번째 인자를 받을 ...
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