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
モブ社員がモブエンジニアを名乗って得られたこと_20260413
masakiokuda
4
550
[2026前期火5] 論理学(京都大学文学部 前期 第1回)「ハルシネーションを外部世界との対応を考えずに見分ける方法」
yatabe
0
1.2k
Soluciones al examen de Geografía 2026. JUNIO (Convocatoria Ordinaria)
juanmartin2026
1
5.7k
遊ぶかね欲しさの犯行(ルビ:労働)です
shirayanagiryuji
0
140
Modern Data Fetching Techniques in Angular
debug_mode
0
230
「機械学習と因果推論」入門 ⑤ 因果効果推定の一般化
masakat0
0
150
Data Management and Analytics Specialisation
signer
PRO
0
1.9k
Visionary Initiative: Future Intelligence 「未来の知性と社会の礎を築く」|Science Tokyo(東京科学大学)
sciencetokyo
PRO
0
810
2026年度春学期 統計学 第8回(オンデマンド配信回) 演習(1)・問題に対する答案の書き方 (2026. 5. 21)
akiraasano
PRO
0
110
[2026前期火5] 論理学(京都大学文学部 前期 第6回)「かつとまたはの規則」
yatabe
0
420
良書紹介08_ 頭のいい子がやっているすごいグラフの読み方
bunnchinn3
0
110
Info Session MSc Computer Science & MSc Applied Informatics
signer
PRO
0
300
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.6k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
Why Our Code Smells
bkeepers
PRO
340
58k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
230
Information Architects: The Missing Link in Design Systems
soysaucechin
0
1k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
260
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
62
44k
My Coaching Mixtape
mlcsv
0
170
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
190
Scaling GitHub
holman
464
140k
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 • …
͝ࢹௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ