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
160
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
模組化的Swift架構(一) Redux入門
2022/3/15 ios@Taipei分享
介紹SwiftRex
Hai Feng Kao
June 23, 2022
More Decks by Hai Feng Kao
See All by Hai Feng Kao
物件導向的文藝復興:用DCI重塑程式設計的藝術
haifengkao
0
180
模組化的Swift架構(二) DDD速成
haifengkao
0
910
日常生活中的腦殘
haifengkao
0
290
機器學習超入門
haifengkao
0
190
UICollectionView自動布局
haifengkao
1
470
宅宅設計入門2
haifengkao
2
310
宅宅設計入門
haifengkao
5
330
Other Decks in Programming
See All in Programming
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
14
6.4k
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.3k
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
150
AIを活用したE2Eテスト実装効率化のあゆみ / ebisu-mobile-14-kotetu
kotetuco
0
130
Developing with AI Agents — Codex, Claude Code & Cowork Practical Guide
x5gtrn
PRO
0
1.3k
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
300
act1-costs.pdf
sumedhbala
0
120
A2UI という光を覗いてみる
satohjohn
1
160
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
410
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
1
310
Creating Composable Callables in Contemporary C++
rollbear
0
170
これからAgentCoreを触る方へトレンドはGatewayです
har1101
2
260
Featured
See All Featured
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
How to Talk to Developers About Accessibility
jct
2
260
For a Future-Friendly Web
brad_frost
183
10k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
580
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
180
The SEO Collaboration Effect
kristinabergwall1
1
490
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
950
Into the Great Unknown - MozCon
thekraken
41
2.6k
Fireside Chat
paigeccino
42
4k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
260
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
120k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
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)