iOS/Combine

    [Combine 책 정리] Chapter 6: Time Manipulation Operators

    안녕하세요 코찐입니다. 이번 챕터는 Time manipulation(시간 조작)에 관한 챕터입니다. 아래의 자료를 따라서 공부하고 있습니다. 하나하나 따라하기 좋게 구성되어 있습니다. https://www.raywenderlich.com/books/combine-asynchronous-programming-with-swift/v2.0 https://github.com/raywenderlich/comb-materials/tree/editions/2.0/06-time-based-operators/projects raywenderlich/comb-materials The projects and the materials that accompany the Combine: Asynchronous Programmin..

    [Combine 책 정리] Chapter 5: Combining Operators

    내용을 전부 쓰는 것 보다 좀 더 요약하는게 좋을 것 같아서 요약하는 방식으로 변경했습니다. https://www.raywenderlich.com/books/combine-asynchronous-programming-with-swift/v2.0 책 보면서 학습하고 있습니다. 더보기 이전글 2021/01/03 - [Reactive Programming] - [Combine 책 정리] Chapter1. Hello, Combine! 2021/01/06 - [Reactive Programming] - [Combine 책 정리] Chapter2. Hello, Combine! 2021/01/12 - [Reactive Programming] - [Combine 책 정리] Chatper 3: Transforming O..

    [Combine 책 정리] Chapter 4: Filtering Operators

    이전글 2021/01/03 - [Reactive Programming] - [Combine 책 정리] Chapter1. Hello, Combine! 2021/01/06 - [Reactive Programming] - [Combine 책 정리] Chapter2. Hello, Combine! 2021/01/12 - [Reactive Programming] - [Combine 책 정리] Chatper 3: Transforming Operators 이번 챕터에서는 특별히 신선한 내용은 없었다. 실제 사례에서 여러 operator들을 잘 조합해보는게 중요할 듯 Filtering basics example(of: "filter") { let numbers = (1...10).publisher numbers .fil..

    [Combine 책 정리] Chatper 3: Transforming Operators

    이전글 2021/01/03 - [Reactive Programming] - [Combine 책 정리] Chapter1. Hello, Combine! 2021/01/06 - [Reactive Programming] - [Combine 책 정리] Chapter2. Publishers & Subscribers 이번 챕터는 Operator Operators and publishers operator method는 사실 publisher를 return 함 upstream data -> operator 에서 가공 -> downstream으로 전달 error handling을 위한 operator가 아니면, error를 downstream으로 흘려보내줌 (이번 챕터에서는 에러 핸들링 다루지 않음) Collecting..

    [Combine 책 정리] Chapter 2: Publishers & Subscribers

    이전글 2021/01/03 - [Reactive Programming] - [Combine 책 정리] Chapter1. Hello, Combine! 챕터2 부터는 실습 위주 Hello Publisher example(of: "Publisher") { // 1 let myNotification = Notification.Name("MyNotification") // 2 let publisher = NotificationCenter.default .publisher(for: myNotification, object: nil) // 3 let center = NotificationCenter.default // 4 let observer = center.addObserver( forName: myNotific..

    [정리] 토비의 봄 TV - 스프링 리액티브 프로그래밍

    https://www.youtube.com/watch?v=8fenTR3KOJo 개념 Duality: 쌍대성. 수학적 표현 Observer Pattern: 디자인패턴 Reactive Streams: 자바 진영에서 정한 표준 Duality 기능은 똑같은데, 반대방향으로 표현한 것 (에릭 마이어 정의 찾아보기) Iterable Observable Iterable Observable 데이터 방향 Pull Push 함수 호출 next() notifyObservers(i) return 값 있음 없음 여러개의 Observer가 동시에 데이터 받기 어려움 쉬움 멀티 스레드 동작 만들기 어려움 쉬움 Iterable import java.util.Iterator; public class IteratorExample { p..

    [Combine 책 정리] Chapter 1: Hello, Combine!

    https://www.raywenderlich.com/books/combine-asynchronous-programming-with-swift/v2.0 책의 목표 추상적으로 들리는 컴바인의 개념을 이해 한 챕터씩 따라가면서 컴바인이 무엇을 해결하고자 하는지 배워나감 애플에서는 Combine을 통해 이벤트 처리를 위한 선언적 접근을 함 Delegate나 Completion Handler 구현 대신 이벤트 소스에 대한 Single processing chain을 만들 수 있음 비동기 프로그래밍 (Asynchronous programming) 스레드 1개가 코드 실행 결과로 "Tom Harding"이 출력됨을 보장 가능 begin var name = "Tom" print(name) name += " Hardi..