Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ReactiveCocoa
Search
nghialv
December 14, 2015
Education
860
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ReactiveCocoa
nghialv
December 14, 2015
More Decks by nghialv
See All by nghialv
How LLMs Actually Work
nghialv
0
30
Presentation for CA.go
nghialv
0
130
A consistent delivery process with GitOps style for any application on any platform
nghialv
0
550
How it works - 1.1 - What happens when you run kubectl apply command
nghialv
0
1.1k
Why and how we build a unified CD system
nghialv
0
370
PipeCD at CyberAgent
nghialv
2
1.2k
Introdution_to_PipeCD.pdf
nghialv
2
750
The Journey of Software Delivery
nghialv
4
470
Monitoring at AbemaTV
nghialv
18
12k
Other Decks in Education
See All in Education
Course Review - Lecture 13 - Information Visualisation (4019538FNR)
signer
PRO
1
2.7k
良書紹介08_ 頭のいい子がやっているすごいグラフの読み方
bunnchinn3
0
110
2026年度春学期 統計学 第10回 分布の推測とは - 標本調査,度数分布と確率分布 (2026. 6. 4)
akiraasano
PRO
0
120
「機械学習と因果推論」入門 ③ 漸近効率な推定量と二重機械学習
masakat0
0
740
LinkedIn
matleenalaakso
0
4.4k
Soluciones al examen de Geografía 2026. JUNIO (Convocatoria Ordinaria)
juanmartin2026
1
5.7k
[2026前期火5] 論理学(京都大学文学部 前期 第12回)「証明を走らせる:カリー・ハワード対応」
yatabe
0
180
Data Physicalisation - Lecture 9 - Next Generation User Interfaces (4018166FNR)
signer
PRO
1
1.1k
Case Studies and Future Research - Lecture 12 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
200
[2026前期火5] 論理学(京都大学文学部 前期 第5回)「 ならばの問題演習・proof net・かつの規則」
yatabe
0
360
Visionary Initiative: Materials-Positive Society — Evolving “Things,” empowering a positive society | Science Tokyo
sciencetokyo
PRO
0
130
Lectura 2 (PIT : Python Basico)
robintux
0
370
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Typedesign – Prime Four
hannesfritz
42
3.1k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
880
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
63
55k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.7k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
300
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
230
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
190
Prompt Engineering for Job Search
mfonobong
0
370
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
490
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
Transcript
5ͰReactiveCocoa TechLTձ2015
• Le Van Nghia (ΪΞ) • @nghialv (twitter: nghialv2607) ΞΧϯτ
• CyberAgentʹ৽ଔೖࣾ • FRESH!ੜ์ૹ , AmebaΞϓϦ
“2015ٕज़తʹมԽͷଟ͍1Ͱͨ͠Ͷ” Πϕϯτ֓ཁΑΓ
ٕज़ؔͳ͍Ͱ͕͢ɼCyberAgentͷϩΰมԽ͞Ε·ͨ͠ɻ
http://abema.tv https://amebafresh.tv Coming Soon!
• ϓϩδΣΫτϝϯόʔ30໊ • αʔόʔ & Πϯϑϥ x 6 • Go
1.5.2, Docker 1.9.0, AWS, Microservices, RESTful API (goji) • ϑϩϯτ x 6 • Node.js v4, TypeScript 1.6, React/Flux, SPA + SSR • iOS x 4 • Swift 2.1, ReactiveCocoa, MVVM • Android x 4 • Kotlin, Rx • σβΠφʔ x 3 • Sketch • πʔϧ • Slack + Hubot(ChatOps), Github Enterprise, CircleCI (Enterprise), Fabric, JIRA Agile, Mackerel…
speakerdeck.com/stormcat24/next-fresh-applications-with-amazon-ecs ࢁా͞Μ @stormcat24
2015ͷiOS։ൃ WWDC 2014 1.0 - closure, first-class functions - type
safety and type inference - generics - tuples and multiple return values - seamless access to Objective C, C, C++ 2/2015 1.2 - incremental builds - faster executables - better compiler diagnostics - stability improvements 9/2015 2.0 - error handling model - guard, defer - protocol extension - protocol-oriented programming - ίϯύΠϧ࣌ؒ - ίϯύΠϥͷόά AmebaΞϓϦ FRESH!ੜ์ૹ - ReactiveCocoa - MVVMϞσϧ 1.0ಋೖ - ίϯύΠϧ࣌ؒ - ֎෦ϥΠϒϥϦͷෆ҆ఆ ίʔυ͕ଟ͘ͳͬͨ࣌ - 100% Swift 1.2 - MVCϞσϧ - Future - Result
2015ͷiOS։ൃ 12/2015 Open source - source code - swift package
manager - core libraries - ports for Linux Fall 2016 3.0 FRESH!ੜ์ૹ - Swift2.0ʹҠಈ - ίϯύΠϧ͘ͳͬͨ
ReactiveCocoaͷλΠϜ
ReactiveCocoa (RAC) is a Cocoa framework inspired by Functional Reactive
Programming. It provides APIs for composing and transforming streams of values over time.
ReactiveCocoa (RAC) is a Cocoa framework inspired by Functional Reactive
Programming. It provides APIs for composing and transforming streams of values over time.
ReactiveCocoa (RAC) is a Cocoa framework inspired by Functional Reactive
Programming. It provides APIs for composing and transforming streams of values over time.
None
water pipe event pipe
event signal observe sink
event signal observe sink let (signal, sink) = Signal<String, ErrorType>.pipe()
signal .observe { event in // hi } sink.sendNext("hi")
event signal observe sink observe let (signal, sink) = Signal<String,
ErrorType>.pipe() signal .observe { event in // hi } sink.sendNext("hi") signal .observe { event in // hi }
event signal observe sink observe observe͢ΔલͷeventΛड͚औΕͳ͍
ReactiveCocoa (RAC) is a Cocoa framework inspired by Functional Reactive
Programming. It provides APIs for composing and transforming streams of values over time.
event signal observe sink transform
event signal observe sink let (signal, sink) = Signal<String, ErrorType>.pipe()
signal .map { string in string.uppercaseString } .observe { event in // “HI" } sink.sendNext("hi") transform hi HI
event observe sink
throttle event signal observe sink throttle let (signal, sink) =
Signal<Int, ErrorType>.pipe() signal .throttle(0.5, onScheduler: QueueScheduler()) .observe { num in // 1 // 4 } sink.sendNext(1) sink.sendNext(2) sink.sendNext(3) // after 0.5 second sink.sendNext(4)
combinePrevious let (signal, sink) = Signal<Int, ErrorType>.pipe() signal .combinePrevious(0) .observe
{ pre, cur in // pre = 0, cur = 1 // pre = 1, cur = 2 } sink.sendNext(1) sink.sendNext(2)
Transforming • map • filter • reduce • collect •
mapError • observeOn • ignoreNil • timeoutWithError • take • delay • skip • takeUntil • combinePrevious • takeLast • throttle • promoteErrors
ReactiveCocoa (RAC) is a Cocoa framework inspired by Functional Reactive
Programming. It provides APIs for composing and transforming streams of values over time.
• compose <A, B, C> (A -> B, B ->
C) -> A -> C f1: A -> B f2: B -> C f3: C -> D f = f1ɾf2ɾf3 => f: A -> D
Signal, TransformΛΈ߹Θͤͯɼ ผͷSignalΛߏͰ͖Δ
event signal observe sink transform transform ࿈ଓͰTransformΛΈ߹ΘͤΔ
observe ෳSignalΛΈ߹ΘͤΔ
͜ΕͰ͖ΔΑʂ
zip let (numbersSignal, numbersSink) = Signal<Int, NoError>.pipe() let (lettersSignal, lettersSink)
= Signal<String, NoError>.pipe() let newSignal = zip(numbersSignal, lettersSignal) newSignal .observe { event in println(event) } numbersSink.sendNext(1) // nothing printed lettersSink.sendNext("A") // prints (1, A) numbersSink.sendNext(2) // nothing printed lettersSink.sendNext("B") // prints (1, B) lettersSink.sendNext("C") // nothing printed lettersSink.sendNext("D") // nothing printed
Ͳͷͱ͜Ζʹ͑Δ?
• શ෦ • Model • ViewModel • View • Manager
• Api • …
͝ࢹௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ