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
CQRSをモバイルに適用してみる
Search
Shinnosuke Kugimiya
April 20, 2016
Programming
6
2.8k
CQRSをモバイルに適用してみる
potatotips #28での発表内容です。
まだ試行錯誤中ですが、考えをまとめてみました。
Shinnosuke Kugimiya
April 20, 2016
Tweet
Share
More Decks by Shinnosuke Kugimiya
See All by Shinnosuke Kugimiya
UIテストはもうMaestroでいいのかもしれない話
kgmyshin
23
13k
新規開発を始めるときにやるべきこと
kgmyshin
19
8.8k
android app error handling
kgmyshin
1
1.4k
solid+cqs+dry
kgmyshin
35
9.9k
Paging Library ~ アイテムの更新 ~
kgmyshin
2
3.2k
KotlinでReact Native(expo) を使いたい
kgmyshin
2
1.1k
新規チームで新規開発を始める時にやること
kgmyshin
40
8.7k
android-multi-module-with-dagger
kgmyshin
10
6.1k
kotlin linter
kgmyshin
12
15k
Other Decks in Programming
See All in Programming
テストコード文化を0から作り、変化し続けた組織
kazatohiei
2
1.5k
これでLambdaが不要に?!Step FunctionsのJSONata対応について
iwatatomoya
2
3.6k
テスト自動化失敗から再挑戦しチームにオーナーシップを委譲した話/STAC2024 macho
ma_cho29
1
1.3k
たのしいparse.y
ydah
3
120
Security_for_introducing_eBPF
kentatada
0
110
Scalaから始めるOpenFeature入門 / Scalaわいわい勉強会 #4
arthur1
1
330
DevFest Tokyo 2025 - Flutter のアプリアーキテクチャ現在地点
wasabeef
5
900
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
130
talk-with-local-llm-with-web-streams-api
kbaba1001
0
180
Jakarta EE meets AI
ivargrimstad
0
240
42 best practices for Symfony, a decade later
tucksaun
1
180
103 Early Hints
sugi_0000
1
230
Featured
See All Featured
Facilitating Awesome Meetings
lara
50
6.1k
Automating Front-end Workflow
addyosmani
1366
200k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
A better future with KSS
kneath
238
17k
KATA
mclloyd
29
14k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
Documentation Writing (for coders)
carmenintech
66
4.5k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
2
170
How to Think Like a Performance Engineer
csswizardry
22
1.2k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Transcript
CQRSͷߟ͑ํΛ ϞόΠϧʹద༻ͯ͠ΈΔ (ࢼߦࡨޡத) potatotips #28
CQRSͱʁ
Command and Query Responsibility Segregation ίϚϯυΫΤϦ
Command and Query Separation ίϚϯυΫΤϦ ϝιουϨϕϧͰίϚϯυͱΫΤϦΛ ͚Α͏ͱ͍͏ߟ͑
CQRSCQSΛઃܭϨϕϧʹ ΈࠐΜͩͷ
Α͋͘Δͨͱ͑ Bertrand Meyerʮ͋ΒΏΔϝιουɺΞΫγϣϯ Λ࣮ߦ͢ΔίϚϯυ͔ɺݺͼग़͠ݩʹσʔλΛฦ͢ ΫΤϦ͔ͷ͍ͣΕ͔Ͱ͋ͬͯɺ྆ํΛߦͬͯͳΒ ͳ͍ɻ͜Εɺ࣭Λ͢Δ͜ͱͰճΛมԽͤͯ͞ ͳΒͳ͍ͱ͍͏͜ͱͩɻʯ ఝٶʮGETϝιουͷதͰUPDATE͢ΔͳΈ͍ͨͳʯ
CommandଆͱQueryଆʹ ͚ΔͱԿ͕͋Γ͕͍͔ͨʁ
ҙ ׂͱීஈޠΒΕΔCQRSEvent Sourcing͋Γ͖Ͱ ޠΒΕ·͢ ͨͩɺEvent SourcingϞόΠϧͷઃܭʹ ߹Θͳ͍ͷͰͦΕൈ͖Ͱ͠·͢ ৄ͍࣌ؒ͠ͳ͍ͷͰɺׂѪ
ͦͦCommandଆͱQueryଆ ߟ͑Δ͜ͱ͕݁ߏҧ͏ɻ
؆୯ͳFeedܥͷΞϓϦΛ࡞Ζ͏ͱͯ͠ɺ هࣄҰཡͱ͔هࣄৄࡉαΫαΫ࡞Εͯ ͳ͔ͳ͔៉ྷͳઃܭͩͬͨͷʹɺ POSTͳϝιουΛݺͿػೳೖΕ్ͨɺ શମͷઃܭ͔Β౷Ұੑ͕ফ͑ͨ͜ͱ͋Γ·ͤΜ͔ʁ ͋Δ͋Δʁ
͡Ί͔Β CommandଆͱQueryଆΛ͚ͯߟ͑Δͱ ͦ͏͍͏൵͔ܶΒٹΘΕΔ
3PVUFS ྫ͑͜Μͳײ͡ (WIP) Read Command Command binding %PNBJO Observable/ Promise(DTO)
7JFX.PEFM Feedback 6* JOGSBTUSVDUVSF
Commandଆ - ඇಉظ௨৴ - υϝΠϯ - Feedbackͷํ๏ ΒΜΛ͔ͬ͠Γߟ͑ͯΕ ͳΜͰ͍͍ͱࢥ͏ɻ JOGSBTUSVDUVSF
3PVUFS Command %PNBJO Feedback 6*
None
None
binding Observable/ Promise(DTO) 7JFX.PEFM 6* Readଆ(Ͳ͏Ͱྑ͍) Readଆ࠷ѱɺ Smart UI Anti
Patternʹ ͯ·ͬͯ ͦΜͳʹมͳ͜ͱͳΒͳ͍ JOGSBTUSVDUVSF
None
͜͏͢Δ͜ͱͰ݁ߏઃܭ͕εοΩϦ͢Δ
ͨͩ͠ɺ͜͏͍͏ཁ݅ʹ߹Θͳ͍ • ΫΠζܥ • ήʔϜܥ Read͖ͯͨ͠ͷΛॾʑՃͨ͠Γ͢Δܥ
binding Observable/ Promise(DTO) 7JFX.PEFM 6* JOGSBTUSVDUVSF binding 7JFX.PEFM 6* JOGSBTUSVDUVSF
%PNBJO ͜͜ʹϩδοΫΛೖΕͨΓೖΕͳ͔ͬͨΓͰΉ
·ͱΊ
• ReadଆɺCommandଆͰઃܭΛߟ͑ΔͱεοΩϦ͢Δ • Readଆ͕ෳࡶͳ߹߹Θͳ͍͔͠Εͳ͍
༡ΜͰΔͷͰ͋·ΓࢀߟʹͳΒͳ͍͔͚ͩͲɺαϯϓϧ https://github.com/kgmyshin/esa-android
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠