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
RxJSで時空を制した話
Search
Jun Tomioka
July 14, 2016
Programming
3
790
RxJSで時空を制した話
RxJSで時空を制した話@M3techmeetup
http://m3-engineer.connpass.com/event/33802/
Jun Tomioka
July 14, 2016
Tweet
Share
More Decks by Jun Tomioka
See All by Jun Tomioka
Dotty で軽量な DI ライブラリをかいてみた
jooohn
1
290
ソフトウェアエンジニアとしてモナドを完全に理解する / make-perfect-sense-of-monad
jooohn
14
7.5k
ScalaのコンパイラにFizzBuzzを解いてもらう(Dottyもあるよ)
jooohn
1
950
Write stack safe non-tailrec recursive functions
jooohn
4
880
Introduction to Clean Architecture
jooohn
1
530
人類には早すぎる、謎の計算ロジックに立ち向かう / Strugle with the most complicated logic ever
jooohn
1
1.6k
Work at M3 USA
jooohn
0
1.2k
クラウド電子カルテを支えるテクノロジーの光と闇
jooohn
0
1.2k
怖くないCats
jooohn
0
730
Other Decks in Programming
See All in Programming
103 Early Hints
sugi_0000
1
220
快速入門可觀測性
blueswen
0
330
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
660
Security_for_introducing_eBPF
kentatada
0
110
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
120
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
4
190
Discord Bot with AI -for English learners-
xin9le
1
120
短期間での新規プロダクト開発における「コスパの良い」Goのテスト戦略」 / kamakura.go
n3xem
2
170
RWC 2024 DICOM & ISO/IEC 2022
m_seki
0
200
クリエイティブコーディングとRuby学習 / Creative Coding and Learning Ruby
chobishiba
0
3.9k
talk-with-local-llm-with-web-streams-api
kbaba1001
0
170
今年のアップデートで振り返るCDKセキュリティのシフトレフト/2024-cdk-security-shift-left
tomoki10
0
190
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Thoughts on Productivity
jonyablonski
67
4.4k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Mobile First: as difficult as doing things right
swwweet
222
9k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.3k
The Pragmatic Product Professional
lauravandoore
32
6.3k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Transcript
RxJSͰۭ࣌Λ੍ͨ͠ M3, Inc. Jun Tomioka
ࣗݾհ Ԭ ७ (@jooohn) - ΤϜεϦʔגࣜձࣾ - ΤϯδχΞϦϯάG - ৽نϓϩδΣΫτx2
(ॾࣄʹΑΓඇެ։த) - ՇͷാͱؒΛͱͬͯڮຊ͔ Β̎h௨ۈʢڠٞதʣ
RxJSͰۭ࣌Λ੍ͨ͠
ॾࣄʹΑΓ αʔϏε༰Λݴ͑ͳ͍ͷͰ ԾͷαʔϏεͰઆ໌͠·͢
https://github.com/jooohn/rx-angular-example
ۭ࣌Λ੍͢Δલ https://goo.gl/1wlYCu
ۭ࣌Λ੍͍ͤͯͳ͍ • Ϣʔβʔ͕ૢ࡞͢ΔɺͨΒୟ͔ΕΔAPIίʔϧ • λΠϛϯάʹΑۭ͕ͬͯ࣌Ή • Load Moreͷॱ൪ • લճͷݕࡧ݁ՌΫϦΞ
• ݹ͍݅ͷݕࡧ݁ՌΛදࣔʂʂ
ʰjʱͰݕࡧ ʰjaʱͰݕࡧ ʰjaʱͷ݁Ռ ʰjʱͷ݁Ռ ۭ࣌ͷΈ
ۭ࣌ͷΈ
ͭΒ͍
ͦ͜Ͱ
None
None
An API for asynchronous programming with observable streams ࠓճॏཁͳ
None
Αͦ͞͏
ۭ࣌Λ੍͍ͤͯͳ͍ • Ϣʔβʔ͕ૢ࡞͢ΔɺͨΒୟ͔ΕΔAPIίʔϧ • λΠϛϯάʹΑۭ͕ͬͯ࣌Ή
ۭ࣌Λ੍͍ͤͯͳ͍ • Ϣʔβʔ͕ૢ࡞͢ΔɺͨΒୟ͔ΕΔAPIίʔϧ • λΠϛϯάʹΑۭ͕ͬͯ࣌Ή
combineLatest
ݕࡧΩʔϫʔυͷετϦʔϜ େͷετϦʔϜ “” “j” “ja” Asia Europe combineLatest “” /
Asia “j” / Asia “ja” / Asia “ja” / Europe ݕࡧ݅ͷετϦʔϜ
ݕࡧ݅ͷ ετϦʔϜΛ ҰຊԽ
debounce
debounce debounce(300) ݕࡧ݅ͷετϦʔϜ 300msҎʹଞͷΠϕϯτ͕͋ΔͷΛഉআ
debounce debounce(300) ݕࡧ݅ͷετϦʔϜ ࿈ଧɾΩʔλΠϓͰͷແବͳϦΫΤετΛݮʂ
ۭ࣌Λ੍͍ͤͯͳ͍ • Ϣʔβʔ͕ૢ࡞͢ΔɺͨΒୟ͔ΕΔAPIίʔϧ • λΠϛϯάʹΑۭ͕ͬͯ࣌Ή
ۭ࣌Λ੍͍ͤͯͳ͍ • Ϣʔβʔ͕ૢ࡞͢ΔɺͨΒୟ͔ΕΔAPIίʔϧ • λΠϛϯάʹΑۭ͕ͬͯ࣌Ή
flatMapLatest
͜Ε͚ͩ
flatMap
flatMapLatest
flatMapLatest ݅A ݅B ݅C ݅D flatMapLatest(݅ => ݁ՌͷετϦʔϜ) ݁ՌA ݁ՌB
݁ՌC ݁ՌD
flatMapLatest ݅A ݅B ݅C ݅D flatMapLatest(݅ => ݁ՌͷετϦʔϜ) ݁ՌA ݁ՌB
݁ՌC ݁ՌD ۭ͕࣌·ͳ͍
ۭ͕࣌·ͳ͍ʂ
flatMapLatest
͜Ε͚ͩͰ
ۭ͕࣌·ͳ͍ʂ
ۭ࣌Λ੍͍ͤͯͳ͍ • Ϣʔβʔ͕ૢ࡞͢ΔɺͨΒୟ͔ΕΔAPIίʔϧ • λΠϛϯάʹΑۭ͕ͬͯ࣌Ή
https://goo.gl/7phFXe
ۭ࣌Λ੍ͨ͠ʂ