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
680
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
TCAの Shared Stateって どういう仕組みになってんの?
yimajo
0
540
Swift 5.9 からの Observation はiOS17 未満 からも使えて struct の変更検知もできるんすかね?
yimajo
2
350
不安定なテストは200種類あんねん
yimajo
2
320
TCA v0.19.0からのSwitchStore/CaseLetが良い
yimajo
0
1.7k
TCAでViewStoreにKeyPath DynamicMemberLookupが使われてる件
yimajo
0
870
【開催説明資料】iOSアプリ開発のための Functional Architecture 情報共有会
yimajo
0
190
SWORD ART COMBINE
yimajo
1
1k
iOSアプリ開発のためのThe Composable Architectureがすごく良いので紹介したい
yimajo
5
3.9k
iOS CleanArchitecture 勉強会用の開会前資料
yimajo
0
100
Other Decks in Programming
See All in Programming
Try creating your own orderedmap
kazamori
1
250
Fragment Composition of GraphQL
quramy
13
1.5k
Micro Frontends for Java Microservices - Utah JUG 2024
mraible
PRO
1
110
DMMプラットフォームがTiDB Cloudを採用した背景
pospome
9
4.3k
2 週間で Twitter Bot を作ってみた
contour_gara
0
790
AmperとFleetを使ったAndroidアプリ
yoppie
0
270
R言語の環境構築と基礎 Tokyo.R 112
bob3bob3
0
280
Build Apps for iOS, Android & Desktop in 100% Kotlin With Compose Multiplatform (mDevCamp 2024)
zsmb
0
470
Tailwind CSSを本気でカスタマイズする方法
fsubal
15
5.5k
Documentation for users with AsciiDoc and Antora
ahus1
0
370
デフォルトにして至高、RubyMineの大好きな所
ruzia
0
960
Elm Form Validation
bkuhlmann
0
520
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
34
6k
Being A Developer After 40
akosma
67
580k
Designing for Performance
lara
601
67k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
358
22k
Happy Clients
brianwarren
92
6.4k
KATA
mclloyd
16
12k
The Cost Of JavaScript in 2023
addyosmani
21
3.9k
Product Roadmaps are Hard
iamctodd
45
9.8k
Teambox: Starting and Learning
jrom
128
8.4k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
123
39k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
9
1.3k
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͕֎෦ݺͼग़͠ • Ϋϩʔδϟ෦Ͱউखʹ࣮ߦͤͨ͞Γ