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

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

by 애디 오스마니(Addy Osmani), 윤창식
August 2024
Beginner to intermediate
384 pages
7h 38m
Korean
Hanbit Media, Inc.
Content preview from 자바스크립트 + 리액트 디자인 패턴
154
자바스크립트 + 리액트 디자인 패턴
관찰자 패턴을 사용하는, 또 다른 이유는 클래스를 강하게 결합시키지 않으면서 관련 객체
들 사이의 일관성을 유지해야 하는 상황에 있습니다. 예를 들어 어떤 한 객체가 다른 객체들
이 어떤 식으로 구현되어 있는지 생각할 필요 없이 알림을 보낼 수 있어야 하는 경우가 있습
니다.
관찰자 패턴 또는 발행/구독 패턴을 사용하면 주체와 객체 사이에 동적인 관계가 형성됩니
다. 이를 통해 애플리케이션의 여러 부분이 강하게 결합되어 있을 때 구현하기 까다로운 뛰
어난 유연성을 쉽게 구현할 수 있습니다.
관찰자 패턴과 발행/구독 패턴이 모든 문제에 대한 최고의 해결책은 아닐지라도, 이 패턴들
은 시스템의 구성 요소 간 결합도를 낮추는 훌륭한 도구입니다. 따라서 모름지기 자바스크립
트 개발자라면 필수적으로 짚고 넘어가야 할 도구입니다.
7.18.3
단점
하지만 관찰자 패턴과 발행/구독 패턴의 일부 문제점은 이 패턴이 가진 핵심적인 특성에서
비롯됩니다. 발행자/구독 패턴에서는 발행자와 구독자의 연결을 분리함으로써, 애플리케이
션의 특정 부분들이 기대하는 대로 동작하고 있다는 것을 보장하기 어려워질 수도 있습니다.
예를 들어 발행자가 한 명 이상의 구독자를 가지고 있다고 가정해 봅시다. 그리고 애플리케
이션의 프로세스와 관련된 에러를 로깅하거나 출력한다고 생각해 봅시다. 만약 로깅을 담당
하는 구독자의 기능이 중단되거나 갑자기 제대로 작동하지 않는다 해도 발행자는 시스템의
연결이 분리된 특성 때문에 이러한 장애를 알 수 있는 ...
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