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
TSKaigi 2024 の登壇から広がったコミュニティ活動について
tsukuha
0
160
DevOps視点でAWS re:invent2024の新サービス・アプデを振り返ってみた
oshanqq
0
180
OpenAIの蒸留機能(Model Distillation)を使用して運用中のLLMのコストを削減する取り組み
pharma_x_tech
4
560
Amazon Kendra GenAI Index 登場でどう変わる? 評価から学ぶ最適なRAG構成
naoki_0531
0
110
開発生産性向上! 育成を「改善」と捉えるエンジニア育成戦略
shoota
2
390
KubeCon NA 2024 Recap / Running WebAssembly (Wasm) Workloads Side-by-Side with Container Workloads
z63d
1
250
スタートアップで取り組んでいるAzureとMicrosoft 365のセキュリティ対策/How to Improve Azure and Microsoft 365 Security at Startup
yuj1osm
0
220
GitHub Copilot のテクニック集/GitHub Copilot Techniques
rayuron
37
14k
Qiita埋め込み用スライド
naoki_0531
0
5.1k
re:Invent をおうちで楽しんでみた ~CloudWatch のオブザーバビリティ機能がスゴい!/ Enjoyed AWS re:Invent from Home and CloudWatch Observability Feature is Amazing!
yuj1osm
0
130
バクラクのドキュメント解析技術と実データにおける課題 / layerx-ccc-winter-2024
shimacos
2
1.1k
社外コミュニティで学び社内に活かす共に学ぶプロジェクトの実践/backlogworld2024
nishiuma
0
270
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
181
21k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
How to Think Like a Performance Engineer
csswizardry
22
1.2k
Done Done
chrislema
181
16k
Thoughts on Productivity
jonyablonski
67
4.4k
How to Ace a Technical Interview
jacobian
276
23k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
2
170
Large-scale JavaScript Application Architecture
addyosmani
510
110k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
The Cult of Friendly URLs
andyhume
78
6.1k
How to train your dragon (web standard)
notwaldorf
88
5.7k
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ࢼߦࡨޡத • ࠓޙऔΓΜͰɺࣗͳΓͷਖ਼ղΛݟ͚͍ͭͨ