Combine


Combine

왜 Combine이 소개되었는가? 1.기존의 비동기 처리 방식들 - Target / Action - Notification Center - URLSession - KVO - Ad-hoc callbacks 2. 여러 방식들을 조합해서 개발하다보니, 코드가 복잡해짐 3. 통합된 비동기 처리 방식이 필요 4. 일관된 방식으로 비동기 처리 할 수 있는 API를 combine으로 제공 - A unified, declarative API for processing values over time Combine Overview 1. 3가지 주요 컴포넌트 - Publisher : 생산자, 배출자, 크리에이터, 배설자 - Subscriber : 소비자, 구독자, 받는 사람 - Operator : 변경시키는 사람, 마법사, 가공하는 사람 Publisher protocol Publisher { associatedtype Output associatedtype Failure: Error func subsc...



원문링크 : Combine