$30 off During Our Annual Pro Sale. View Details »
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
150
模組化的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
130
模組化的Swift架構(二) DDD速成
haifengkao
0
870
日常生活中的腦殘
haifengkao
0
280
機器學習超入門
haifengkao
0
180
UICollectionView自動布局
haifengkao
1
460
宅宅設計入門2
haifengkao
2
300
宅宅設計入門
haifengkao
5
320
Other Decks in Programming
See All in Programming
ELYZA_Findy AI Engineering Summit登壇資料_AIコーディング時代に「ちゃんと」やること_toB LLMプロダクト開発舞台裏_20251216
elyza
0
200
ZOZOにおけるAI活用の現在 ~モバイルアプリ開発でのAI活用状況と事例~
zozotech
PRO
9
5.7k
S3 VectorsとStrands Agentsを利用したAgentic RAGシステムの構築
tosuri13
6
320
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
8
2.9k
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
10
1.3k
認証・認可の基本を学ぼう前編
kouyuume
0
250
Rediscover the Console - SymfonyCon Amsterdam 2025
chalasr
2
170
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
270
tsgolintはいかにしてtypescript-goの非公開APIを呼び出しているのか
syumai
7
2.2k
エディターってAIで操作できるんだぜ
kis9a
0
730
LLMで複雑な検索条件アセットから脱却する!! 生成的検索インタフェースの設計論
po3rin
3
810
「コードは上から下へ読むのが一番」と思った時に、思い出してほしい話
panda728
PRO
38
26k
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.3k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
For a Future-Friendly Web
brad_frost
180
10k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.6k
Side Projects
sachag
455
43k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Done Done
chrislema
186
16k
Rails Girls Zürich Keynote
gr2m
95
14k
Producing Creativity
orderedlist
PRO
348
40k
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)