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
360
キャッチアップ!The Composable Architecture
tatsubee
July 20, 2023
Tweet
Share
More Decks by tatsubee
See All by tatsubee
pixivのリアーキテクチャにおける The Composable Architecter活用
shoryuyamamoto
0
90
pixivアプリは変化する
shoryuyamamoto
0
390
マルチウィンドウでアプリケーションの表現を拡張する
shoryuyamamoto
1
130
【After iOSDC LT Night〜ピクシブ×日経×タイミー〜】実装!Interactive Widgets
shoryuyamamoto
0
13
SwiftPM マルチモジュール構成への第一歩
shoryuyamamoto
0
1.9k
TCA with UIKit [TCAでわいわいLT会]
shoryuyamamoto
1
810
Dart Macrosに願いを [YOUTRUST x ゆめみ Flutter LT会@渋谷 #4]
shoryuyamamoto
0
640
riverpodを理解したい
shoryuyamamoto
0
85
pixiv-iosを破壊したい #pixivmeetup
shoryuyamamoto
0
1.3k
Other Decks in Technology
See All in Technology
Can We Measure Developer Productivity?
ewolff
1
150
Lexical Analysis
shigashiyama
1
150
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
320
マルチプロダクトな開発組織で 「開発生産性」に向き合うために試みたこと / Improving Multi-Product Dev Productivity
sugamasao
1
310
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
28
13k
OTelCol_TailSampling_and_SpanMetrics
gumamon
1
190
飲食店データの分析事例とそれを支えるデータ基盤
kimujun
0
150
オープンソースAIとは何か? --「オープンソースAIの定義 v1.0」詳細解説
shujisado
9
1.1k
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
2
3.2k
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
950
Evangelismo técnico: ¿qué, cómo y por qué?
trishagee
0
360
IBC 2024 動画技術関連レポート / IBC 2024 Report
cyberagentdevelopers
PRO
1
110
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Scaling GitHub
holman
458
140k
Docker and Python
trallard
40
3.1k
Unsuck your backbone
ammeep
668
57k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Bash Introduction
62gerente
608
210k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
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ࢼߦࡨޡத • ࠓޙऔΓΜͰɺࣗͳΓͷਖ਼ղΛݟ͚͍ͭͨ