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
770
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
270
ソフトウェアエンジニアとしてモナドを完全に理解する / make-perfect-sense-of-monad
jooohn
14
7.4k
ScalaのコンパイラにFizzBuzzを解いてもらう(Dottyもあるよ)
jooohn
1
900
Write stack safe non-tailrec recursive functions
jooohn
4
820
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.1k
怖くないCats
jooohn
0
700
Other Decks in Programming
See All in Programming
BasicBasic認証
sadnessojisan
5
2.5k
From Spring Boot 2 to Spring Boot 3 with Java 22 and Jakarta EE
ivargrimstad
0
940
Modular Monolith Go Server with GraphQL Federation + gRPC
110y
1
550
快適な開発と高セキュリティを実現するCryptoKitを活用したCoreDataのデータ暗号化術
grandbig
1
300
Go Code Generation at newmo / 2024-08-27 #newmo_layerx_go
genkey6
0
510
私のEbitengineの第一歩
qt_luigi
0
410
フロントエンドカンファレンス北海道2024 『小規模サイトでも使えるVite 〜HTMLコーディングをよりスマートに〜』長谷川広武(ハム)
h2ham
1
2.5k
Hono・Prisma・AWSでGeoなAPI開発
nokonoko1203
5
610
『ドメイン駆動設計をはじめよう』中核の業務領域
masuda220
PRO
5
840
Ebitengineの1vs1ゲーム WebRTCの活用
ponyo877
0
330
What we keep in mind when migrating from Serverless Framework to AWS CDK and AWS SAM
kasacchiful
1
130
Appleの新しいプライバシー要件対応: ノーコードアプリ プラットフォームの実践事例
nao_randd
1
450
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
354
29k
Documentation Writing (for coders)
carmenintech
65
4.3k
Bootstrapping a Software Product
garrettdimon
PRO
304
110k
What's in a price? How to price your products and services
michaelherold
241
11k
Testing 201, or: Great Expectations
jmmastey
35
6.9k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
226
52k
Thoughts on Productivity
jonyablonski
65
4.2k
Faster Mobile Websites
deanohume
304
30k
Infographics Made Easy
chrislema
239
18k
Code Reviewing Like a Champion
maltzj
518
39k
Designing for humans not robots
tammielis
248
25k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
27
7.4k
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
ۭ࣌Λ੍ͨ͠ʂ