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

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

by 애디 오스마니(Addy Osmani), 윤창식
August 2024
Beginner to intermediate
384 pages
7h 38m
Korean
Hanbit Media, Inc.
Content preview from 자바스크립트 + 리액트 디자인 패턴
78
자바스크립트 + 리액트 디자인 패턴
이제 모든
Car
객체는
toString
()
메서드를 공유합니다.
7.3
모듈 패턴
모듈은 애플리케이션 아키텍처의 핵심 구성 요소이며 프로젝트를 구성하는 코드 단위를 체
계적으로 분리 및 관리하는 데 효과적으로 활용됩니다.
초기 자바스크립트에서는 다음과 같은 다양한 방법으로 모듈을 구현했습니다.
■ 객체 리터럴 표기법
Object
Literal
Notation
■ 모듈 패턴
■
AMD
모듈
■
CommonJS
모듈
5
장에서 이미 최신 자바스크립트 모듈(
ES
모듈 또는
ECMAScript
모듈 )에 대한 개념을 다
루었습니다. 이번 절에서는 이를 ‘
ES
모듈’이라고 칭하겠습니다.
ES2015
이전에는 모듈 내보내기 기능을 지원하는
CommonJS
모듈이나
AMD
모듈이 주로
사용되었습니다.
AMD
,
CommonJS
,
UMD
모듈에 대한 분석은 뒷부분인
10
장에서 알아보
기로 하고, 본 장에서는 먼저 모듈 패턴의 개념과 그 역사에 대해 살펴보도록 하겠습니다.
모듈 패턴의 일부분은 객체 리터럴을 기반으로 구현되므로, 먼저 객체 리터럴에 대해 이해해
봅시다.
7.3.1
객체 리터럴
객체 리터럴 표기법은 객체는 중괄호 (
{}
) 안에서 키
key
와 값
value
을 쉼표 (
,
)로 구분하여 객
체를 정의하는 방법입니다. 객체 내부의 키는 문자열 또는 식별자를 사용하며 콜론 (
:
)으로
끝마칩니다. 그리고 오류 방지를 위해 마지막 줄 끝에는 쉼표 사용을 권장하지 않습니다.
79
Chapter 07_
자바스크립트 디자인 패턴
const ...
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