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
33
Presentation for CA.go
nghialv
0
130
A consistent delivery process with GitOps style for any application on any platform
nghialv
0
560
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
480
Monitoring at AbemaTV
nghialv
18
12k
Other Decks in Education
See All in Education
観察、仮説、実行、検証、計画、提案を一年で3000回トレーニングする方法/3000 Thinking Loops in 365 Days
moriyuya
4
380
生成AI時代のエンジニア育成について考えてみた
akasan
0
200
Gitがない時代 インターネットがない時代の 開発話
sapi_kawahara
0
340
第2部-高校生とAI活用/high-school2026-2
okana2ki
0
110
Catecismo 26 #1 - Aula inaugural
cm_manaus
0
220
Visionary Initiative: Future Intelligence 「未来の知性と社会の礎を築く」|Science Tokyo(東京科学大学)
sciencetokyo
PRO
0
1.1k
0513
cbtlibrary
0
240
遊ぶかね欲しさの犯行(ルビ:労働)です
shirayanagiryuji
0
210
2026年度春学期 統計学 第9回 確からしさを記述する ー 確率 (2026. 5. 28)
akiraasano
PRO
0
170
[2026前期火5] 論理学(京都大学文学部 前期 第11回)「ハーモニー:三層モデルと保存拡大」
yatabe
0
200
2026年度春学期 統計学 第6回 データの関係を知る(1)ー 相関関係 (2026. 5. 14)
akiraasano
PRO
0
200
新しいJavaを学んで・使っていこう! / osd26do
gishi_yama
0
200
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
190
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
Visualization
eitanlees
152
17k
Are puppies a ranking factor?
jonoalderson
1
3.8k
Ruling the World: When Life Gets Gamed
codingconduct
0
290
Building AI with AI
inesmontani
PRO
1
1.1k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
480
Six Lessons from altMBA
skipperchong
29
4.4k
So, you think you're a good person
axbom
PRO
2
2.1k
Unsuck your backbone
ammeep
672
58k
The Limits of Empathy - UXLibs8
cassininazir
1
580
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 • …
͝ࢹௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ