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
530
マルチウィンドウでアプリケーションの表現を拡張する
shoryuyamamoto
1
170
【After iOSDC LT Night〜ピクシブ×日経×タイミー〜】実装!Interactive Widgets
shoryuyamamoto
0
14
SwiftPM マルチモジュール構成への第一歩
shoryuyamamoto
0
2k
TCA with UIKit [TCAでわいわいLT会]
shoryuyamamoto
1
940
Dart Macrosに願いを [YOUTRUST x ゆめみ Flutter LT会@渋谷 #4]
shoryuyamamoto
0
680
riverpodを理解したい
shoryuyamamoto
0
89
pixiv-iosを破壊したい #pixivmeetup
shoryuyamamoto
0
1.4k
Other Decks in Technology
See All in Technology
Goで実践するBFP
hiroyaterui
1
120
Docker Desktop で Docker を始めよう
zembutsu
PRO
0
180
深層学習と3Dキャプチャ・3Dモデル生成(土木学会応用力学委員会 応用数理・AIセミナー)
pfn
PRO
0
460
Visual StudioとかIDE関連小ネタ話
kosmosebi
1
380
【NGK2025S】動物園(PINTO_model_zoo)に遊びに行こう
kazuhitotakahashi
0
240
ドメイン駆動設計の実践により事業の成長スピードと保守性を両立するショッピングクーポン
lycorptech_jp
PRO
13
2.3k
Azureの開発で辛いところ
re3turn
0
240
あなたの人生も変わるかも?AWS認定2つで始まったウソみたいな話
iwamot
3
860
AWS Community Builderのススメ - みんなもCommunity Builderに応募しよう! -
smt7174
0
180
タイミーのデータ活用を支えるdbt Cloud導入とこれから
ttccddtoki
1
170
When Windows Meets Kubernetes…
pichuang
0
310
実践! ソフトウェアエンジニアリングの価値の計測 ── Effort、Output、Outcome、Impact
nomuson
0
2.1k
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Designing Experiences People Love
moore
139
23k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
We Have a Design System, Now What?
morganepeng
51
7.3k
Designing for Performance
lara
604
68k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
98
18k
VelocityConf: Rendering Performance Case Studies
addyosmani
327
24k
Agile that works and the tools we love
rasmusluckow
328
21k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.1k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
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ࢼߦࡨޡத • ࠓޙऔΓΜͰɺࣗͳΓͷਖ਼ղΛݟ͚͍ͭͨ