하는 것이 일반적입니다. 예를 들어 메뉴 시스템을 구성할 때 메뉴 항목의 클릭 이벤트를 처
리하는 전용 뷰가 있을 수 있습니다. 하지만 메뉴가 세부 내용을 표시하는 뷰와 강하게 결합
될 경우 코드의 유지보수가 어려워지므로 바람직하지 않습니다. 이러한 문제를 해결하기 위
해 이벤트 집합 패턴을 사용할 수 있는데,
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.
O’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
I 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
I’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
I'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.