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
TCAでのClient/Managerの 利用パターンでは副作用のActionやErrorを分...
Search
yimajo
November 22, 2020
Programming
0
830
TCAでのClient/Managerの 利用パターンでは副作用のActionやErrorを分離できる
iOSアプリ開発のためのFunctional Architecture情報共有会2 の発表資料です。
https://connpass.com/event/194239/
yimajo
November 22, 2020
Tweet
Share
More Decks by yimajo
See All by yimajo
良いテストコードのために悪いテストコードを理解する - 不安定なテスト編: iOSアプリ開発ユニットテストの場合
yimajo
22
6k
TCAの Shared Stateって どういう仕組みになってんの?
yimajo
0
1.8k
Swift 5.9 からの Observation はiOS17 未満 からも使えて struct の変更検知もできるんすかね?
yimajo
2
840
不安定なテストは200種類あんねん
yimajo
3
880
TCA v0.19.0からのSwitchStore/CaseLetが良い
yimajo
0
1.9k
TCAでViewStoreにKeyPath DynamicMemberLookupが使われてる件
yimajo
0
1k
【開催説明資料】iOSアプリ開発のための Functional Architecture 情報共有会
yimajo
0
250
SWORD ART COMBINE
yimajo
1
1.1k
iOSアプリ開発のためのThe Composable Architectureがすごく良いので紹介したい
yimajo
5
4.1k
Other Decks in Programming
See All in Programming
Multi Step Form, Decentralized Autonomous Organization
pumpkiinbell
1
750
負債になりにくいCSSをデザイナとつくるには?
fsubal
10
2.4k
データの整合性を保つ非同期処理アーキテクチャパターン / Async Architecture Patterns
mokuo
47
17k
定理証明プラットフォーム lapisla.net
abap34
1
1.8k
ペアーズでの、Langfuseを中心とした評価ドリブンなリリースサイクルのご紹介
fukubaka0825
2
330
ファインディLT_ポケモン対戦の定量的分析
fufufukakaka
0
730
パスキーのすべて ── 導入・UX設計・実装の紹介 / 20250213 パスキー開発者の集い
kuralab
3
790
チームリードになって変わったこと
isaka1022
0
200
Flutter × Firebase Genkit で加速する生成 AI アプリ開発
coborinai
0
160
メンテが命: PHPフレームワークのコンテナ化とアップグレード戦略
shunta27
0
120
なぜイベント駆動が必要なのか - CQRS/ESで解く複雑系システムの課題 -
j5ik2o
11
3.9k
『GO』アプリ バックエンドサーバのコスト削減
mot_techtalk
0
140
Featured
See All Featured
Gamification - CAS2011
davidbonilla
80
5.1k
Raft: Consensus for Rubyists
vanstee
137
6.8k
Building Your Own Lightsaber
phodgson
104
6.2k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
Scaling GitHub
holman
459
140k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
12
960
Typedesign – Prime Four
hannesfritz
40
2.5k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
410
Transcript
TCAͰͷClient/Managerͷ ར༻ύλʔϯͰ෭࡞༻ͷ ActionErrorΛͰ͖Δ iOSΞϓϦ։ൃͷͨΊͷFunctional Architectureใڞ༗ձ2 @yimajo 2020/11/22 #fa_ios
The Composable Architecture ʹ ಛఆͷ෭࡞༻Λ·ͱΊΔΧελϜͳ Client/Managerܕͷαϯϓϧ͕͋Δ
• DownloadClient • WebSocketClient • LocalSearchClient • WeatherClient • SpeechClient
• AuthenticationClient • AudioPlayerClient • AudioRecorderClient • MotionManager • LocationManager
State Action View Store DI Environment Client Effect Reducer Error
"DUJPO
State Action View Store DI Environment Client Effect Reducer Error
"DUJPO
State Action View Store DI Environment Client Effect Reducer Error
"DUJPO
State Action View Store DI Environment Client Effect Reducer Error
"DUJPO
State Action View Store DI Environment Client Effect Reducer Error
"DUJPO
State Action View Store DI Environment Client Effect Reducer Error
"DUJPO
State Action View Store DI Environment Client Effect Reducer Error
"DUJPO
Clientͷߏ
෭࡞༻࣮ߦΫϩʔδϟ ઐ༻ͷΤϥʔ ઐ༻ͷ"DUJPO
$MJFOUͷ࣮ߦΛอ࣋͢Δ %FQFOEFODJFT
TUBUJDMFUMJWFͰγϯάϧτϯతͳΠϯλϑΣʔε ෭࡞༻࣮ߦΫϩʔδϟDBODFMͷఆٛ ෭࡞༻࣮ߦΫϩʔδϟEPXOMPBEͷఆٛ
MJWFͷݺͼग़͠&OWJSPONFOUͰ lMJWFzͷݴ༿ͷҙຯΑ͘Θ͔Βͳ͍ QSFWJFXʹMJWF͏ͷͰຊ൪༻ͬͯҙຯͰͳ͍ MJWF/VNCFS'BDU GPS ͳͲ୯ʹ௨৴͢Δ͚ͩɻ ࢹͳͲΛ͍ͯ͠ΔΘ͚Ͱͳ͍ɻ GBWPSJUF JEJT'BWPSJUF BTZOD"GUFSͳͷͰඇಉظॲཧ
Clientͷ෭࡞༻࣮ߦΫϩʔδϟͷ ݺͼग़͠
෭࡞༻࣮ߦΫϩʔδϟEPXOMPBEͷ࣮ߦ
ཧ۶ͱͯ͠ɺ$PSF.PUJPOͷ TUBSU%FWJDF.PUJPO6QEBUFT VTJOH UP ͜ΕͷϞʔγϣϯΛݕ͢Δͱಈ࡞͢ΔΫϩʔδϟɻ ͜ͷ෭࡞༻࣮ߦΫϩʔδϟ֎෦͔ΒݺΕͣɺ ෦Ͱ4VCTDSJCFS͕ΠϕϯτΛTFOEͯ͘͠ΕΔɻ
෭࡞༻࣮ߦΫϩʔδϟͷ෦ݺͼग़͠ • ࣗಈͰԿ͔Λࢹͯ͠มԽ͕͋ͬͨΒAction͕ݺͼग़ͤΔ • Motion • Location • Core DataͷFetch
Result Controller
%PXOMPBE$MJFOUͷ"DUJPOΛ3FEVDFSʹ͑Δ
·ͱΊ • Action/ErrorΛݸผʹఆٛ • ෭࡞༻࣮ߦΫϩʔδϟ • ΫϩʔδϟΛReducer͕֎෦ݺͼग़͠ • Ϋϩʔδϟ෦Ͱউखʹ࣮ߦͤͨ͞Γ