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

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

by 애디 오스마니(Addy Osmani), 윤창식
August 2024
Beginner to intermediate
384 pages
7h 38m
Korean
Hanbit Media, Inc.
Content preview from 자바스크립트 + 리액트 디자인 패턴
183
Chapter 08_
자바스크립트 MV* 패턴
MVC
는 세 가지 핵심 요소로 구성됩니다. 이어지는 절에서 모두 살펴보겠습니다.
8.2.1
모델
모델은 애플리케이션의 데이터를 관리하는 역할을 합니다.
UI
나 프레젠테이션 계층은 담당
하지 않고, 애플리케이션에 필요한 고유 데이터 형식을 나타냅니다. 모델이 변경될 때 (예:
업데이트 ) 관찰자(예: 뷰 - 뒤에서 자세히 다룰 예정)에게 변경사항을 알립니다. 이렇게 함
으로써 관찰자가 변경된 내용에 알맞게 능동적으로 대응할 수 있게끔 합니다.
모델을 더 깊게 이해하기 위해서 사진 갤러리 애플리케이션을 예로 들어 봅시다. 사진 갤러
리에서는 고유한 도메인 관련 데이터를 보여주므로 ‘사진’이 독자적인 모델이 될 수 있습니
다. 이러한 모델에는 설명, 이미지 소스, 추가 메타데이터와 같은 관련 속성들이 포함될 수
있습니다. 특정 사진은 모델의 인스턴스로 저장되어 재사용도 가능합니다.
모델의 내장 기능은 프레임워크마다 다를 수 있습니다. 그러나 대개 모델의 속성(예: 모델 식
별자 )을 검증하는 기능을 지원합니다. 실제 애플리케이션에서 모델을 사용할 때는 일반적으
로 모델의 데이터가 지속적으로 유지되기를 원하게 됩니다. 이러한 지속성을 이용하면 가장
최근 상태가 메모리나 로컬 저장소에 저장되거나 데이터베이스와도 동기화될 것이라는 것을
전제로 모델을 수정하고 업데이트할 수 있습니다.
한 가지 모델을 여러 뷰가 관찰할 수도 있습니다. 예를 들어, 위치 정보(경도와 위도 ), 사진
에 등장하는 친구들
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