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
Why use Redux in iOS
Search
yohei sugigami
March 22, 2018
Technology
5
2.5k
Why use Redux in iOS
yohei sugigami
March 22, 2018
Tweet
Share
More Decks by yohei sugigami
See All by yohei sugigami
Snapshot Testing in iOS
susieyy
6
3.1k
Redux with iOS
susieyy
0
1.2k
ReduxRxを活用したアプリアーキテクチャ
susieyy
8
2.3k
Redux+Rxを活用したiOSアプリアーキテクチャ
susieyy
10
1.9k
Swaggerで始めるAPI定義管理とコードジェネレート
susieyy
14
7.4k
開発中のアプリをXcode9 & Swift4に移行しました
susieyy
0
3.6k
Wantedly People ViewModel and Rx
susieyy
7
6.9k
ReduxDevTools' power to the iOS development
susieyy
0
810
Realm Centered Design
susieyy
5
780
Other Decks in Technology
See All in Technology
AIチャットボット開発への生成AI活用
ryomrt
0
170
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
Python(PYNQ)がテーマのAMD主催のFPGAコンテストに参加してきた
iotengineer22
0
500
rootlessコンテナのすゝめ - 研究室サーバーでもできる安全なコンテナ管理
kitsuya0828
3
390
CDCL による厳密解法を採用した MILP ソルバー
imai448
3
120
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.9k
Adopting Jetpack Compose in Your Existing Project - GDG DevFest Bangkok 2024
akexorcist
0
110
誰も全体を知らない ~ ロールの垣根を超えて引き上げる開発生産性 / Boosting Development Productivity Across Roles
kakehashi
1
230
OS 標準のデザインシステムを超えて - より柔軟な Flutter テーマ管理 | FlutterKaigi 2024
ronnnnn
0
190
Incident Response Practices: Waroom's Features and Future Challenges
rrreeeyyy
0
160
CysharpのOSS群から見るModern C#の現在地
neuecc
2
3.5k
オープンソースAIとは何か? --「オープンソースAIの定義 v1.0」詳細解説
shujisado
9
1.1k
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
95
5.2k
Faster Mobile Websites
deanohume
305
30k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
Site-Speed That Sticks
csswizardry
0
27
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Raft: Consensus for Rubyists
vanstee
136
6.6k
What's in a price? How to price your products and services
michaelherold
243
12k
Being A Developer After 40
akosma
87
590k
Why Our Code Smells
bkeepers
PRO
334
57k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
10 Git Anti Patterns You Should be Aware of
lemiorhan
655
59k
Transcript
ɹ ɹ Why use Redux in iOS ɹ ɹ ɹ
iOS Flux/Reduxษڧձ 2018/03/22@Wantedly Yohei Suginami ( @susieyy )
Profile — Yohei Sugigami — susieyy — Twitter / Qiita
/ Github — New app development specialist — Clients — Folio.inc — New app developer — Wantedly.inc — Technical advisor
ɹ ɹ ɹ ɹ Flux/ReduxΓ্͕ͬͯ·͢Ͷʂ
ɹ ɹ ɹ ɹ ϨΩγΛৼΓฦΔ
None
None
None
None
None
None
None
None
None
None
ɹ ɹ ɹ ɹ ຊͰ࠾༻ࣄྫ͕૿͑ͯ·͢Ͷʂ
ɹ ɹ ͳͥReduxͳͷ͔
ɹ ɹ ΞϓϦ։ൃʹ͓͚Δ ࠷େͷ՝ɹɹɹ
ɹ ɹ ෳࡶͰ͋Δ͜ͱ
Ͳ͏γϯϓϧʹམͱ͠ࠐΉ͔ɹɹɹ ɹ ɹ ɹ ɹ ѲɾཧͰ͖ΔΑ͏ʹ͢Δ͔
ΞϓϦ։ൃʹ͓͚Δෳࡶੑͱ खଓ͖తهड़ʹΑΔॲཧͷྲྀΕͷѲͷ͠ʹ͘͞ — σϦήʔτύλʔϯͷίʔϧόοΫࠈ — ϑΝοτίϯτϩʔϥʔ
ΞϓϦ։ൃʹ͓͚Δෳࡶੑͱ Өڹൣғͷෆ͔֬͞ɺہॴԽ͞ΕͣҬͳӨڹൣғ — γϯάϧτϯʢάϩʔόϧมͷଟ༻ʣ
ΞϓϦ։ൃʹ͓͚Δෳࡶੑͱ ଟ༷ͳঢ়ଶͷදݱͷͨΊʹଟͷذͱଟͷมͷग़ݱ — ม͕มԽ͢ΔཁҼ͕ࡏԽ — ݅ذʹ্༷ભҠ͠ͳ͍ܦ࿏ؚ·ΕΔ
ॾѱͷࠜݯMVC ෳࡶੑͷղܾࡦΛMVCʹมΘΔΞʔΩςΫνϟٻΊͨ — MVVMʢCʣʴFRP — CleanAcrhitecture / Viper — Flux
/ Redux
MVVMʢCʣʴFRP ෳࡶੑͷରቂ — ϦΞΫςΟϒͳؔʹநԽ͠ɺతͰએݴతͳهड़ — ࿈ଓ͢Δ૬ޓ࡞༻Λѻ͍͍͢ — ঢ়ଶอ࣋ͷͨΊͷมΛݮ — ↑
RxͷετϦʔϜʹแ — ඇಉظΛབྷΊͨॲཧͷՄಡੑߴ͍දݱྗ — εϐʔυײ͋Δ։ൃ
MVVMʢCʣʴFRP σϝϦοτ — ߴ͍ͷநԽʹΑΔهड़қͷ্ঢ — ෳࡶͳRxͷΦϖϨʔλʔΛۦ͢Δ͜ͱͰ͔͑ͬͯڍಈ͕ Θ͔Γʹ͍͘ — ϚϧνεϨουͳॲཧ֤ετϦʔϜͰಠཱతʹಈ࡞͢Δ —
هड़ྗߴ͍͕ಈ࡞ͷѲɾσόοά͠ʹ͍͘
CleanAcrhitecture / Viper ෳࡶੑͷରቂ — ΦϒδΣΫτࢦͷׂͰγϯϓϧʹམͱ͠ࠐΉ — ϨΠϠʔׂɾґଘͷࢦੑ — ϨΠϠʔͷΠϯλʔϑΣΠεͱ࣮ͷʹΑΔநԽ
— νʔϜεέʔϥϏϦςΟͷ্
CleanAcrhitecture / Viper σϝϦοτ — ʹΑΔهड़ྔ͕૿͑Δίʔυ — ։ൃεϐʔυͷݮ — ঢ়ଶͱखଓ͖ΛΧϓηϧԽʹΑΔγϯϓϧԽͷݶք
ɹ ɹ ReduxͱԿ͔
None
None
Մಡੑͷ্ ॻ͘ίετΑΓɺಡΉίετΛԼ͛Δ — ಡΈ͘͢ɺΓ͍ͨ͜ͱɾॲཧ͕Ѳ͍͢͠ — Өڹൣғ͕ਪఆ͍͢͠ — ϨϏϡʔ͍͢͠ — εϐʔυײ͋Δ։ൃ
— ΞϓϦنͱνʔϜߏͷεέʔϥϏϦςΟͷ্
Viewͱঢ়ଶͷશͳΔ — ViewͷॲཧͰͦͷॠؒͷΞϓϦͷͯ͢ͷঢ়ଶ ʢState)͕ҰҙͰ͋Δ͜ͱΛอূ͞ΕΔ — StateΠϛϡʔλϒϧ — ͦͷॠؒͷঢ়ଶʹରͯ͠ඇಉظͷհೖ͕ͳ͍ — ViewʹStateΔͱදࣔҰҙʹܾ·Δ
— View͕ؔܕࢦʹͳΔ
७ਮؔ — ೖྗʹରͯ݁͠Ռ͕ҰҙͰ͋Δ — ϓϩάϥϛϯάʹ͓͍ͯϩδοΫΛγϯϓϧѻ͏ͨΊͷۃ Έ — ෭࡞༻ഉআͱ — ςελϏϦςΟ্
Ϛγϯύϫʔ্͕͕ͬͨ͜ͱʹΑΔ߽తͳΞʔΩςΫνϟ ϚγϯύϫʔΛ͏·͘ར༻͢Δ͜ͱͰγϯϓϧΛ࣮ݱ͍ͯ͠Δ ॲཧͷྻԽ - ϝΠϯεϨου্ͰϏδωεϩδοΫ(ߋ৽ॲཧ)ͷಈ࡞ - γϯάϧϝΠϯεϨου͚ͩͰಈ࡞͍ͯ͠ΔΑ͏ͳײ֮ͰΞ ϓϦ͕ॻ͚Δ Viewͷޮతͳߋ৽ͷͨΊͷࠩݕίετ -
ϏδωεϩδοΫॲཧޙͷViewͷӨڹൣғΛؔ͠ͳ͍
Swi!ݴޠͱͷ૬ੑͷྑ͞ — TypeSafe — Struct / Immutable — ComputedProperty —
Enum / PatternMatch — Generics — Functional Oriented — Protocol Oriented
σόοά༰қੑ ɹ DEMO
Redux՝ — ΞΫγϣϯͷॱংੑΛ੍͚͍ͮͨʢεςʔτϚγϯʣ — Actionϧʔϓ — StateͷΠχγϟϥΠζͱΦϓγϣϯφϧ — ϝϞϦϚωδϝϯτʢը໘ഁغ࣌ʹ෦Stateͷഁغʣ —
Viewͷޮతͳߋ৽ͷͨΊͷࠩߋ৽ʢվળͷ༨͋Γʣ
ReduxۜͷؙͰͳ͍ ɹ ɹ ɹ దࡐ͔Ͳ͏͔ɹɹɹɹɹ ΞϓϦཁ݅ɺ࣭ཁ݅ɹɹɹɹ νʔϜߏɺ։ൃظؒ࣍ୈɹɹ
·ͱΊ Reduxඇৗʹݫ֨ɾݎ࿚Ͱ͋ΓγϯϓϧͳϩδοΫܗ — ७ਮؔ — Πϛϡʔλϒϧ — ୯Ұࢦੑϑϩʔ ʢ ϚϧνεϨουͷہॴԽ
ʣ — ෭࡞༻ʢඇಉظॲཧʣͷہॴԽ
߹ΘͤͯಡΈ͍࣮ͨફฤ ɹ Redux+RxΛ׆༻ͨ͠ΞϓϦΞʔ ΩςΫνϟ CA.swi! #5 2018/01/25@גࣜձࣾαΠόʔΤʔδΣϯτ Yohei Suginami (
@susieyy )