Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
模組化的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
200
模組化的Swift架構(二) DDD速成
haifengkao
0
940
日常生活中的腦殘
haifengkao
0
290
機器學習超入門
haifengkao
0
190
UICollectionView自動布局
haifengkao
1
480
宅宅設計入門2
haifengkao
2
310
宅宅設計入門
haifengkao
5
340
Other Decks in Programming
See All in Programming
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
170
JRuby: Past, Present, and Future
headius
0
210
App Intentsのビルドプロセスを支える技術
kntkymt
0
480
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
3.1k
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
1
330
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
510
Turning Architecture into Unit Tests in the AI Era (NSSpain XIV)
steliosf
PRO
1
120
大喜利で理解するLLM as a Judge / Understanding LLM-as-a-Judge through Ogiri
rockname
0
180
setup-vp GitLab対応の裏側
naokihaba
0
140
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
4
400
Workers Cache を知る
syumai
0
310
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
270
Featured
See All Featured
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
330
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.3k
Rails Girls Zürich Keynote
gr2m
96
14k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
310
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
530
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
480
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
710
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Odyssey Design
rkendrick25
PRO
2
840
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
530
Speed Design
sergeychernyshev
33
2.1k
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)