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
模組化的Swift架構(一) Redux入門
Search
Hai Feng Kao
June 23, 2022
Programming
0
130
模組化的Swift架構(一) Redux入門
2022/3/15 ios@Taipei分享
介紹SwiftRex
Hai Feng Kao
June 23, 2022
Tweet
Share
More Decks by Hai Feng Kao
See All by Hai Feng Kao
物件導向的文藝復興:用DCI重塑程式設計的藝術
haifengkao
0
64
模組化的Swift架構(二) DDD速成
haifengkao
0
790
日常生活中的腦殘
haifengkao
0
270
機器學習超入門
haifengkao
0
170
UICollectionView自動布局
haifengkao
1
440
宅宅設計入門2
haifengkao
2
280
宅宅設計入門
haifengkao
5
310
Other Decks in Programming
See All in Programming
パスキーのすべて ── 導入・UX設計・実装の紹介 / 20250213 パスキー開発者の集い
kuralab
3
730
Software Architecture
hschwentner
6
2.1k
Grafana Loki によるサーバログのコスト削減
mot_techtalk
1
120
SwiftUI Viewの責務分離
elmetal
PRO
1
220
Formの複雑さに立ち向かう
bmthd
1
810
法律の脱レガシーに学ぶフロントエンド刷新
oguemon
5
730
Pulsar2 を雰囲気で使ってみよう
anoken
0
230
Immutable ActiveRecord
megane42
0
140
Flutter × Firebase Genkit で加速する生成 AI アプリ開発
coborinai
0
150
Djangoアプリケーション 運用のリアル 〜問題発生から可視化、最適化への道〜 #pyconshizu
kashewnuts
1
240
Rails アプリ地図考 Flush Cut
makicamel
1
110
DROBEの生成AI活用事例 with AWS
ippey
0
130
Featured
See All Featured
Statistics for Hackers
jakevdp
797
220k
The Language of Interfaces
destraynor
156
24k
KATA
mclloyd
29
14k
Bash Introduction
62gerente
610
210k
Documentation Writing (for coders)
carmenintech
67
4.6k
A Philosophy of Restraint
colly
203
16k
GitHub's CSS Performance
jonrohan
1030
460k
Into the Great Unknown - MozCon
thekraken
35
1.6k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
How to Ace a Technical Interview
jacobian
276
23k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Transcript
Redux入⾨ Hai Feng Kao 模組化的Swift架構(⼀)
None
Action0 State0 Action1 State1 Action2 State2
None
Redux • Single source of truth • Read-only state •
New state is created by pure function
Swift的Redux框架 • ReSwift • swift-composable-architecture • SwiftRex
None
Redux的優點 • Debug容易 • AOP簡單 • 和SwiftUI契合度⾼
Redux缺點 • 同功能的程序碼散落各處 • 處理side e ff ect⿇煩 • Async
operation • External state management
µFeatures Architecture • A µFeature contains • Example target •
Test target • Framework target
None
µFeatures + Redux • A µFeature’s framework target contains •
Actions • States • Reducers • Middlewares
Demo
Redux的缺點 • 當新增⼀個µFeature • 把µFeature的reducer加入reducer list • 把µFeature的middleware加入middleware list •
把µFeature的state加入global state • 處理reducer、middleware、state的投影(projection)