Skip to Content
자바스크립트 + 리액트 디자인 패턴
book

자바스크립트 + 리액트 디자인 패턴

by 애디 오스마니(Addy Osmani), 윤창식
August 2024
Beginner to intermediate
384 pages
7h 38m
Korean
Hanbit Media, Inc.
Content preview from 자바스크립트 + 리액트 디자인 패턴
132
자바스크립트 + 리액트 디자인 패턴
폴 칼더
Paul
Calder
와 마크 린튼
Mark
Linton
은
1990
년에 플라이웨이트 패턴을 처음 고안하였으며
복싱 체급에서 이름을 따왔습니다. 플라이급(플라이웨이트 )이라는 이름은 이 패턴의 목표가
메모리 공간의 경량화이기 때문입니다.
실제로 플라이웨이트의 데이터 공유 방식은 여러 비슷한 객체나 데이터 구조에서 공통으로
사용되는 부분만을 하나의 외부 객체로 내보내는 것으로 이루어집니다. 각 객체에 데이터를
저장하기보다는 하나의 의존 외부 데이터에 모아서 저장할 수 있습니다.
7.16.1
사용법
플라이웨이트 패턴을 사용하는 두 가지 방법이 있습니다. 첫 번째는 데이터 레이어에서 메모
리에 저장된 수많은 비슷한 객체 사이로 데이터를 공유하는 것입니다.
또한
DOM
레이어에도 플라이웨이트를 적용할 수 있습니다. 예를 들어 비슷한 동작을 하는
이벤트 핸들러를 모든 자식 요소에 등록하기보다는 부모 요소 같은 중앙 이벤트 관리자에게
맡기는 방법이 있습니다.
전통적으로 플라이웨이트 패턴은 데이터 레이어에서 많이 사용되었기 때문에 이 부분을 먼
저 살펴보겠습니다.
7.16.2
데이터 공유
전통적인 플라이웨이트 패턴에 대해 몇 가지 더 알고 넘어가야 할 개념이 있습니다. 플라이
웨이트 패턴에는 두 가지 개념이 있습니다. 내재적
intrinsic
상태와 외재적
extrinsic
상태입니다.
내재적 정보는 객체의 내부 메서드에 필요한 것이며, 없으면 절대로 동작하지 않습니다. 반
면에 외재적 정보는 제거되어
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

실전 시계열 분석: 통계와 머신러닝을 활용한 예측 기법

실전 시계열 분석: 통계와 머신러닝을 활용한 예측 기법

박찬성, 에일린 닐슨
클라우드 엔지니어를 위한 97가지 조언

클라우드 엔지니어를 위한 97가지 조언

Emily Freeman, Nathen Harvey, 정기훈(Jung Ki Hun)

Publisher Resources

ISBN: 9791169212571