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
23
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
[2026前期火5] 論理学(京都大学文学部 前期 第5回)「 ならばの問題演習・proof net・かつの規則」
yatabe
0
280
Throw Yourself In! - How I've learned English and What I'm Facing
georgeorge
1
140
View Manipulation and Reduction - Lecture 9 - Information Visualisation (4019538FNR)
signer
PRO
1
2.7k
Public Space Is Not For Sale
drikkes
0
110
면접관 눈에 띄는 데이터 분석 포트폴리오 만드는 법 | 2026년 5월 세미나
datarian
0
740
Soluciones al examen de Geografía 2026. JUNIO (Convocatoria Ordinaria)
juanmartin2026
0
4k
Implicit and Cross-Device Interaction - Lecture 10 - Next Generation User Interfaces (4018166FNR)
signer
PRO
2
2.3k
Dashboards - Lecture 11 - Information Visualisation (4019538FNR)
signer
PRO
1
2.7k
Visionary Initiative: Materials-Positive Society 「モノの進化をポジティブな社会の原動力に」|Science Tokyo(東京科学大学)
sciencetokyo
PRO
0
420
2026年度春学期 統計学 第5回 分布をまとめるー記述統計量(平均・分散など) (2026. 5. 7)
akiraasano
PRO
0
140
Protecting Patrons with Digital Vendors
dsalo
0
200
0506
cbtlibrary
0
190
Featured
See All Featured
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
430
Documentation Writing (for coders)
carmenintech
77
5.4k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Navigating Weather and Climate Data
rabernat
0
220
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
320
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
Everyday Curiosity
cassininazir
0
230
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
54k
Paper Plane (Part 1)
katiecoart
PRO
0
9.1k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
590
Heart Work Chapter 1 - Part 1
lfama
PRO
7
36k
Prompt Engineering for Job Search
mfonobong
0
350
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 • …
͝ࢹௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ