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
1
350
キャッチアップ!The Composable Architecture
tatsubee
July 20, 2023
Tweet
Share
More Decks by tatsubee
See All by tatsubee
pixivのリアーキテクチャにおける The Composable Architecter活用
shoryuyamamoto
0
67
pixivアプリは変化する
shoryuyamamoto
0
170
マルチウィンドウでアプリケーションの表現を拡張する
shoryuyamamoto
1
110
【After iOSDC LT Night〜ピクシブ×日経×タイミー〜】実装!Interactive Widgets
shoryuyamamoto
0
13
SwiftPM マルチモジュール構成への第一歩
shoryuyamamoto
0
1.8k
TCA with UIKit [TCAでわいわいLT会]
shoryuyamamoto
1
770
Dart Macrosに願いを [YOUTRUST x ゆめみ Flutter LT会@渋谷 #4]
shoryuyamamoto
0
620
riverpodを理解したい
shoryuyamamoto
0
84
pixiv-iosを破壊したい #pixivmeetup
shoryuyamamoto
0
1.3k
Other Decks in Technology
See All in Technology
APIテスト自動化の勘所
yokawasa
2
210
JPOUG_10_20241018_OracleDB_AWS_v1.3.pdf
asahihidehiko
2
240
Java x Spring Boot Warm up
kazu_kichi_67
2
390
LLMOps : ΔMLOps
shuntaito
14
2.9k
Nix入門パラダイム編
asa1984
1
160
30万人が利用するチャットをFirebase Realtime DatabaseからActionCableへ移行する方法
ryosk7
2
240
EKS初心者が早めに知っておきたかったこと
cuorain
0
130
LLMアプリをRagasで評価して、Langfuseで可視化しよう!
minorun365
PRO
2
200
Trusted Types API と Vue.js
lycorptech_jp
PRO
1
260
WHOLENESS, REPAIRING, AND TO HAVE FUN: 全体性、修復、そして楽しむこと
snoozer05
PRO
2
3k
AIを使って小説を書こう!【2024/10/25講演資料】
kamomeashizawa
0
160
Snowflakeでスロークエリ改善に取り組んだ話
tabata0208
0
160
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Building Adaptive Systems
keathley
38
2.2k
GraphQLとの向き合い方2022年版
quramy
43
13k
StorybookのUI Testing Handbookを読んだ
zakiyama
26
5.2k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.5k
Fontdeck: Realign not Redesign
paulrobertlloyd
81
5.2k
Statistics for Hackers
jakevdp
796
220k
GraphQLの誤解/rethinking-graphql
sonatard
66
9.9k
Faster Mobile Websites
deanohume
304
30k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
43
6.6k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
32
1.8k
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ࢼߦࡨޡத • ࠓޙऔΓΜͰɺࣗͳΓͷਖ਼ղΛݟ͚͍ͭͨ