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

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

by 애디 오스마니(Addy Osmani), 윤창식
August 2024
Beginner to intermediate
384 pages
7h 38m
Korean
Hanbit Media, Inc.
Content preview from 자바스크립트 + 리액트 디자인 패턴
172
자바스크립트 + 리액트 디자인 패턴
jQuery
의
on
()
메서드는 이벤트를 발생시키는
DOM
요소가 너무 많은 경우에 활용하면 좋
은 예시입니다.
10
개,
20
개,
200
개 이상의
DOM
요소에 각각 ‘클릭’ 이벤트를 등록하는 것은
애플리케이션의 성능과 사용자 경험을 떨어뜨릴 수 있습니다. 그 대신
jQuery
의
on
()
메서
드를 사용하면 수많은 개별 이벤트 핸들러를 단 하나의 핸들러로 대체할 수 있습니다.
이벤트 집합 패턴은 간접적인 관계를 가진 객체 간의 소통이 필요한 상황에서도 유용하게 활
용됩니다. 최신 애플리케이션에서는 직접적인 연관성이 없는 다수의 뷰 객체들이 상호작용
하는 것이 일반적입니다. 예를 들어 메뉴 시스템을 구성할 때 메뉴 항목의 클릭 이벤트를 처
리하는 전용 뷰가 있을 수 있습니다. 하지만 메뉴가 세부 내용을 표시하는 뷰와 강하게 결합
될 경우 코드의 유지보수가 어려워지므로 바람직하지 않습니다. 이러한 문제를 해결하기 위
해 이벤트 집합 패턴을 사용할 수 있는데,
menu
:
click
:
foo
같은 이벤트를 호출하여 해당 이
벤트를 처리하는 ‘
foo
’ 객체가 화면에 관련 내용을 표시하도록 할 수 있습니다.
7.19.4
중재자 패턴의 활용
중재자 패턴은 두 개 이상의 객체가 간접적인 관계를 가지고 있고 비즈니스 로직이나 워크플
로에 따라 상호작용 및 조정이 필요한 경우에 유용합니다. 마법사
wizard
형식의 인터페이스는
이러한 적용 사례의 대표적인 예시입니다.
orgChart
예제에서 살펴본 것처럼 마법사 인터페 ...
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