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
キャッチアップ!The Composable Architecture
Search
tatsubee
July 20, 2023
Technology
2
380
キャッチアップ!The Composable Architecture
tatsubee
July 20, 2023
Tweet
Share
More Decks by tatsubee
See All by tatsubee
pixivのリアーキテクチャにおける The Composable Architecter活用
shoryuyamamoto
0
110
pixivアプリは変化する
shoryuyamamoto
0
470
マルチウィンドウでアプリケーションの表現を拡張する
shoryuyamamoto
1
160
【After iOSDC LT Night〜ピクシブ×日経×タイミー〜】実装!Interactive Widgets
shoryuyamamoto
0
14
SwiftPM マルチモジュール構成への第一歩
shoryuyamamoto
0
1.9k
TCA with UIKit [TCAでわいわいLT会]
shoryuyamamoto
1
880
Dart Macrosに願いを [YOUTRUST x ゆめみ Flutter LT会@渋谷 #4]
shoryuyamamoto
0
660
riverpodを理解したい
shoryuyamamoto
0
87
pixiv-iosを破壊したい #pixivmeetup
shoryuyamamoto
0
1.4k
Other Decks in Technology
See All in Technology
DUSt3R, MASt3R, MASt3R-SfM にみる3D基盤モデル
spatial_ai_network
2
110
バクラクのドキュメント解析技術と実データにおける課題 / layerx-ccc-winter-2024
shimacos
2
1.1k
権威ドキュメントで振り返る2024 #年忘れセキュリティ2024
hirotomotaguchi
2
740
あの日俺達が夢見たサーバレスアーキテクチャ/the-serverless-architecture-we-dreamed-of
tomoki10
0
460
WACATE2024冬セッション資料(ユーザビリティ)
scarletplover
0
200
第3回Snowflake女子会_LT登壇資料(合成データ)_Taro_CCCMK
tarotaro0129
0
190
NW-JAWS #14 re:Invent 2024(予選落ち含)で 発表された推しアップデートについて
nagisa53
0
260
10個のフィルタをAXI4-Streamでつなげてみた
marsee101
0
170
プロダクト開発を加速させるためのQA文化の築き方 / How to build QA culture to accelerate product development
mii3king
1
260
2024年にチャレンジしたことを振り返るぞ
mitchan
0
140
組織に自動テストを書く文化を根付かせる戦略(2024冬版) / Building Automated Test Culture 2024 Winter Edition
twada
PRO
13
3.7k
多領域インシデントマネジメントへの挑戦:ハードウェアとソフトウェアの融合が生む課題/Challenge to multidisciplinary incident management: Issues created by the fusion of hardware and software
bitkey
PRO
2
100
Featured
See All Featured
Building an army of robots
kneath
302
44k
Raft: Consensus for Rubyists
vanstee
137
6.7k
The Cost Of JavaScript in 2023
addyosmani
45
7k
Typedesign – Prime Four
hannesfritz
40
2.4k
Building Applications with DynamoDB
mza
91
6.1k
GitHub's CSS Performance
jonrohan
1030
460k
We Have a Design System, Now What?
morganepeng
51
7.3k
Building Better People: How to give real-time feedback that sticks.
wjessup
365
19k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Embracing the Ebb and Flow
colly
84
4.5k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
170
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Transcript
ͨͭ͑ ΩϟονΞοϓʂ The Composable Archtecture
ͨͭ͑ͬͯ୭ʁ ϐΫγϒגࣜձࣾͷ23৽ଔiOSΤϯδχΞ ٕज़ελοΫ: • ຊۀ: Swift (ྺ1) • झຯ: Dart/Flutter
(ྺ3) झຯ: • ϙέϞϯ • ͓ֆඳ͖
ࠓ͢͜ͱ • The Composable Archtectureͬͯͳʹʁ • ࣮ํ๏ • جຊతͳ࣮ •
Dependencies • Test • ͓·͚
The Composable Archtectureͱʁ
TCAͱʁ The Composable Architecture(TCA)υϝΠϯͳͲͰঢ়ଶཧͷϞδϡʔ ϧΛׂ͠ɺߏՄೳʹ͢Δ͜ͱͰɺେنͰෳࡶͳΞϓϦέʔγϣϯͷ ߏஙΛ༰қʹ͢ΔϞμϯͳΞʔΩςΫνϟͰ͢ɻ ref: https://gist.github.com/kalupas226/bdf577e4a7066377ea0a8aaeebcad428
TCAͱʁ ҎԼͷ՝Λղܾ͠Α͏ͱ͢ΔϥΠϒϥϦ •γϯϓϧͳঢ়ଶཧ •εέʔϥϏϦςΟ •෭࡞༻ͷཧ •ςετ༰қੑ •։ൃऀʹͱͬͯͷ͍͢͞ ref: https://gist.github.com/kalupas226/bdf577e4a7066377ea0a8aaeebcad428
جຊతͳ࣮
جຊతͳ࣮ • State • Action • Reducer
جຊతͳ࣮ 4UBUF 0 3FEVDFS "DUJPO
جຊతͳ࣮ DPVOU 0 DPVOU UBQ*ODSFNFOU
جຊతͳ࣮ 4UBUF 0 3FEVDFS "DUJPO
جຊతͳ࣮ 4UBUF 0 3FEVDFS "DUJPO
جຊతͳ࣮ 4UBUF 0 3FEVDFS "DUJPO
جຊతͳ࣮ 4UBUF 0 3FEVDFS "DUJPO & ff FDU
ͪΐͬͱ͍ͬͯ͡ΈΔ
جຊతͳ࣮ DPVOU 0 DPVOU UBQ*ODSFNFOU
DPVOU جຊతͳ࣮ DPVOU 0 DPVOU UBQ*ODSFNFOU UBQ%FDSFNFOU
جຊతͳ࣮ 4UBUF 0 3FEVDFS "DUJPO
جຊతͳ࣮ 0 DPVOU DPVOU DPVOU UBQ*ODSFNFOU UBQ%FDSFNFOU
جຊతͳ࣮ + λοϓճ DPVOU 0 0 UBQQFE $PVOU DPVOU
DPVOU UBQ*ODSFNFOU UBQ%FDSFNFOU
جຊతͳ࣮ + λοϓճ 0 0 UBQQFE $PVOU UBQQFE$PVOU Ͳ͏Ճ͢Δʁ
DPVOU DPVOU DPVOU UBQ*ODSFNFOU UBQ%FDSFNFOU
UBQQFE$PVOU جຊతͳ࣮ + λοϓճ JODSFBTF 0 EFDSFBTF 0 UBQQFE
$PVOU Ͳ͏Ճ͢Δʁ DPVOU UBQ*ODSFNFOU UBQ%FDSFNFOU
جຊతͳ࣮ + λοϓճ JODSFBTF 0 EFDSFBTF 0 UBQQFE $PVOU
Ͳ͏Ճ͢Δʁ DPVOU UBQ*ODSFNFOU UBQ%FDSFNFOU UBQQFE$PVOU
جຊతͳ࣮ EffectTaskͷ • .none • .send • .run (EffectTaskͷͷิ)
جຊతͳ࣮ EffectTaskͷ .none • ՃͰԿΒͳ͍Αʂ
جຊతͳ࣮ EffectTaskͷ .send • ผͷActionΛՃͰߦ͏Α
جຊతͳ࣮ EffectTaskͷ .run • ඇಉظॲཧΛߦ͏Α • ಛ • sendΛҾʹ࣋ͭ •
await͕͑Δ
جຊతͳ࣮ EffectTaskͷͷิ ͖ͬ͞ͷίʔυˠ
جຊతͳ࣮ EffectTaskͷͷิ ͖ͬ͞ͷίʔυˠ ࣮Ξϯνύλʔϯ͔ʁ
جຊతͳ࣮ EffectTaskͷͷิ Ξϯνύλʔϯ • 1ͭͷΞΫγϣϯͰ2ͭͷίετ ͕͔͔Δ • ࠷ॳͷϩδοΫͷޙʹڧ੍͞ΕΔ • ςετංେԽ͢Δ͔
جຊతͳ࣮ EffectTaskͷͷิ ୯७ʹؔΛͯ͠ղܾͰ͖Δ͔
جຊతͳ࣮ EffectTaskͷͷิ దͳ߹͋Δ
Dependencies
Dependencies ఆٛ • ೖ͍ͨ͠class/structΛ࡞ • ຊ൪/ςετͰมߋ͍ͨ͠৯͍ ঢ়ଶʹ͓ͯ͘͠ • DependencyKeyΛઃఆ͢Δ •
live: ຊ൪ • test: ςετ • Preview: XcodeͷϓϨϏϡʔ༻ • DependencyValueΛઃఆ
Dependencies ར༻ • @DependencyͰड͚औΔ
Test
Test ֤ཁૉ͕ίϯϙʔωϯτԽ͞Ε͍ͯΔ ͷͰςετ͕ॻ͖͘͢ͳ͍ͬͯΔ
͓·͚
Feature
Feature • 0.55.0 • Better Bindings Revisited • Add Store.send
and Store.withState • Add Reducer.onChange • Add EffectOf • TCA1.0ʹ͍ͭͯ
TCAͰpixiv clone࡞ͬͯΈͨ
pixiv-clone࡞ͬͯΈͨ with TCA • https://github.com/Shoryu-Y/swiftui-with-tca • ·ͩ·ͩൃల్্ • جຊతͳ࣮ɺDependencyΛऔΓೖΕ͍ͯΔ •
0.55.0ͷมߋऔΓೖΕͨʁ • Test·ͩͬͯͳ͍ • Navigationࢼߦࡨޡத • ࠓޙऔΓΜͰɺࣗͳΓͷਖ਼ղΛݟ͚͍ͭͨ