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
RxSwift Xcoders Riga meetup
Search
Kristaps Grinbergs
January 23, 2019
Technology
0
1.4k
RxSwift Xcoders Riga meetup
Kristaps Grinbergs
January 23, 2019
Tweet
Share
More Decks by Kristaps Grinbergs
See All by Kristaps Grinbergs
Decoding Smart Contracts: From Creation to NFT Integration
fassko
0
420
From Web2 to Web3. A developer story.
fassko
0
710
A journey from Swift to Solidity
fassko
0
800
A journey into the SwiftUI world - Tech Stash by Mintos
fassko
0
960
How to use SwiftUI for rapid development
fassko
0
1k
We need to talk about Websockets
fassko
0
2.3k
How to tame Core Animation
fassko
0
1.5k
The A - Z Guide Of iOS App Development
fassko
1
1.4k
RxSwift
fassko
0
62
Other Decks in Technology
See All in Technology
急成長中のWINTICKETにおける品質と開発スピードと向き合ったQA戦略と今後の展望 / winticket-autify
cyberagentdevelopers
PRO
1
160
日経電子版におけるリアルタイムレコメンドシステム開発の事例紹介/nikkei-realtime-recommender-system
yng87
1
500
最速最小からはじめるデータプロダクト / Data Product MVP
amaotone
5
730
ガチ勢によるPipeCD運用大全〜滑らかなCI/CDを添えて〜 / ai-pipecd-encyclopedia
cyberagentdevelopers
PRO
3
200
コンテンツを支える 若手ゲームクリエイターの アートディレクションの事例紹介 / cagamefi-game
cyberagentdevelopers
PRO
1
130
プロダクトチームへのSystem Risk Records導入・運用事例の紹介/Introduction and Case Studies on Implementing and Operating System Risk Records for Product Teams
taddy_919
1
170
オーティファイ会社紹介資料 / Autify Company Deck
autifyhq
9
120k
「 SharePoint 難しい」ってよく聞くけど、そんなに言うなら8歳の息子に試してもらった
taichinakamura
1
620
現地でMeet Upをやる場合の注意点〜反省点を添えて〜
shotashiratori
0
520
使えそうで使われないCloudHSM
maikamibayashi
0
170
いまならこう作りたい AWSコンテナ[本格]入門ハンズオン 〜2024年版 ハンズオンの構想〜
horsewin
9
2.1k
WINTICKETアプリで実現した高可用性と高速リリースを支えるエコシステム / winticket-eco-system
cyberagentdevelopers
PRO
1
190
Featured
See All Featured
Bash Introduction
62gerente
608
210k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
The World Runs on Bad Software
bkeepers
PRO
65
11k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
The Invisible Side of Design
smashingmag
297
50k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Navigating Team Friction
lara
183
14k
Practical Orchestrator
shlominoach
186
10k
Adopting Sorbet at Scale
ufuk
73
9k
Designing for Performance
lara
604
68k
Building Your Own Lightsaber
phodgson
102
6k
Transcript
RxSwift Introduction to reactive programming Kristaps Grinbergs @fassko
RxSwift isn't KVO, ReactNative or ReactJS
About me • Swift developer at Qminder • BCompSci &
MComSci unfinished DmCompSci • > 15 years in IT • love open source
None
None
Agenda • What is Rx • RxSwift and building blocks
• Examples • Pros and Cons
Imperative programming • Saved state • Order of execution •
Side effects
In computing, reactive programming is a programming paradigm oriented around
data flows and the propagation of change. Wikipedia
Reactive programming is programming with asynchronous data streams
Reactive programming • Asynchronous • No saved state • Functional
• Responsive
ReactiveX An API for asynchronous programming with observable streams. •
Microsoft (Rx.NET) - 2009 • Supports many languages • RxSwift - 2015
Rx components • Observable • Observers • Schedulers
None
None
None
Observables Completed and Error will terminate the stream Next Completed
Error
Operators Filtering Transforming Combining
None
None
RxMarbles.com
None
UI bindings RxCocoa
None
None
None
None
Testing • Async XCTest with expectations • RxBlocking making it
synchronous • Using RxTest and custom Schedulers • https://www.raywenderlich.com/7408-testing-your-rxswift-code • https://www.youtube.com/watch?v=FgbTenGH-P0
+ Agile and reusable code Thread safety Eliminate state from
code Testing Well tested Error handling Large community and extensions Extends MVVM
- Steep learning curve Change previous practices Debugging Testing Over-reactive
Overhead
None
None
Resources • http://reactivex.io/ • https://github.com/ReactiveX/RxSwift • https://github.com/RxSwiftCommunity • http://adamborek.com/ •
http://rx-marin.com/ • RayWenderlich RxSwift book • Shai Michal presentations
None