Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
模組化的Swift架構(一) Redux入門
Hai Feng Kao
June 23, 2022
Programming
0
25
模組化的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
模組化的Swift架構(二) DDD速成
haifengkao
0
330
日常生活中的腦殘
haifengkao
0
220
機器學習超入門
haifengkao
0
140
UICollectionView自動布局
haifengkao
1
380
宅宅設計入門2
haifengkao
2
220
宅宅設計入門
haifengkao
5
270
Other Decks in Programming
See All in Programming
言語処理ライブラリ開発における失敗談 / NLPHacks
taishii
1
420
即、New Relic / New Relic NOW!
uzulla
0
270
Dagger + Anvil: Learning to Love Dependency Injection
vrallev
3
230
設計ナイト2022 トランザクションスクリプト
shinpeim
11
2k
What's new in Android development tools まとめ
mkeeda
0
210
Branching out to Jetpack Compose
chrisbanes
4
1.1k
Running Laravel/PHP on AWS (AWS Builders Day Taiwan 2022)
dwchiang
0
130
Meet Swift Regex
usamik26
0
240
Reactive Java Microservices on Kubernetes with Spring and JHipster
deepu105
1
160
Java初心者が知っておくべきプログラミングのこと - JJUG CCC 2022 Spring
kishida
4
510
IE Graduation Certificate
jxck
6
4.7k
GitHubのユーザー名を変更した後のあれこれ
tahia910
0
120
Featured
See All Featured
For a Future-Friendly Web
brad_frost
166
7.4k
jQuery: Nuts, Bolts and Bling
dougneiner
56
6.4k
How to Ace a Technical Interview
jacobian
265
21k
Design by the Numbers
sachag
271
17k
How STYLIGHT went responsive
nonsquared
85
3.9k
The Art of Programming - Codeland 2020
erikaheidi
32
9.3k
Art Directing for the Web. Five minutes with CSS Template Areas
malarkey
196
9.4k
It's Worth the Effort
3n
172
25k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
119
28k
Learning to Love Humans: Emotional Interface Design
aarron
261
37k
From Idea to $5000 a Month in 5 Months
shpigford
373
44k
Six Lessons from altMBA
skipperchong
14
1.4k
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)