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
コスパの良いiOS開発を求めて
Search
yutu
August 09, 2017
Programming
1
1.9k
コスパの良いiOS開発を求めて
こんなチームならRedux + Passive MVP + Clean Arch(Essence) が今のところ筋が良いのでは?って試行錯誤して実践している話
yutu
August 09, 2017
Tweet
Share
More Decks by yutu
See All by yutu
FBSnapshotTestCaseに助けられた話
yutu
1
2.5k
Other Decks in Programming
See All in Programming
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
140
MCP with Cloudflare Workers
yusukebe
2
220
数十万行のプロジェクトを Scala 2から3に完全移行した
xuwei_k
0
280
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
3
480
return文におけるstd::moveについて
onihusube
1
1.1k
Kaigi on Railsに初参加したら、その日にLT登壇が決定した件について
tama50505
0
100
Monixと常駐プログラムの勘どころ / Scalaわいわい勉強会 #4
stoneream
0
280
「Chatwork」Android版アプリを 支える単体テストの現在
okuzawats
0
180
KubeCon + CloudNativeCon NA 2024 Overviewat Kubernetes Meetup Tokyo #68 / amsy810_k8sjp68
masayaaoyama
0
250
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
340
短期間での新規プロダクト開発における「コスパの良い」Goのテスト戦略」 / kamakura.go
n3xem
2
170
PHPUnitしか使ってこなかった 一般PHPerがPestに乗り換えた実録
mashirou1234
0
220
Featured
See All Featured
Done Done
chrislema
181
16k
A designer walks into a library…
pauljervisheath
204
24k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
KATA
mclloyd
29
14k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
A better future with KSS
kneath
238
17k
Git: the NoSQL Database
bkeepers
PRO
427
64k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Bash Introduction
62gerente
608
210k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Transcript
ίεύͷྑ͍iOS։ൃΛٻΊͯ
ฏҪ ༞थˁ 32 طࠗ • Recruit Marketing Partners • iOS
Engineer • ݘ͕͖
ͯ͞
ίεύʹ ཁͨ͠අ༻ʢίετʣͱ ͦ͜Β͔ΒಘΒΕͨޮՌ
͜͜Ͱ͍͏ίετʹ ֶश࣌ؒ, ࣮࣌ؒ
͜͜Ͱ͍͏ύϑΥʔϚϯεʹ ੜ࢈ੑ, อकੑ, Θ͔Γ͢͞
ΞʔΩςΫνϟͷબఆͬͯ Ή͔͍ͣ͠… ʢϓϩδΣΫτͷنɺϝϯόʔɺ࣌ ظɺ࣌ؒͱ͔͍ΖΜͳഎܠ͕͋Δʣ
ίεύͷ͍͍iOS։ൃͷҰྫͱͯ͠
͜ΜͳνʔϜͳΒ Redux + Passive MVP + Clean Arch(Essence) ͕ࠓͷͱ͜Ζے͕ྑ͍ͷͰʁ ͬͯࢼߦࡨޡ࣮ͯ͠ફ͍ͯ͠Δ
Λ͠·͢
Agenda • ͳͥΒͷνʔϜͰRedux + Passive MVP + Clean Arch(Essence) ͔
• Redux + Passive MVP + Clean Arch(Essence) ͕Βͷνʔ ϜʹԿΛͨΒ͍ͯ͠Δ͔ • Redux + Passive MVP + Clean Arch(Essence) Λࢧ͑Δٕज़ • ·ͱΊ
ͳͥΒͷνʔϜͰRedux + Passive MVP + Clean Arch(Essence) ͔
ΒͷνʔϜͷੜཱ͍ͪ
NewRING byRMP!!!
NewRING byRMP!!! • RMPͷ৽نࣄۀఏҊ੍ • θΫγΟɺΧʔηϯαʔɺελσΟαϓϦɺkidslyͳͲΛੈʹ ૹΓग़͖ͯͨ͠ • ߽՚৹ࠪһͷલͰϓϨθϯͰ͖Δ •
άϥϯϓϦ௨ΕࣄۀԽͰ͖Δ • http://www.recruit-mp.co.jp/feature/company/ newring2017ko.html
NewRING byRMP!!! • 2016213݅ͷԠื • ৭Μͳਓ͕ࢀՃ͢ΔʢӦۀͩͬͨΓاըͩͬ ͨΓҒ͍ਓͩͬͨΓΤϯδχΞͩͬͨΓʣ • ڱ͖ʢग़͚ͨ͠Ͳ௨Βͳ͔ͬͨʣ •
ͰͲΕັྗత
ͭͬͪ͘Ό͑Α͘Ͷʁͬͯࢥͬͯͨ
͋Δ
Producer ݩRailsΤϯδχΞ ύογϣϯ͍͢͝ Engineer A αʔόʔڧ͍ Webϑϩϯτڧ͍ Πϯϑϥڧ͍ DDDಡॻձͱ͔Δਓ Engineer
B ৽ଔ αʔόʔڧ͍ Webϑϩϯτڧ͍ σβΠϯڧ͍ Designer ݩΞϓϦΤϯδχΞ ͔ͩΒΊͬͪΌΓ͍͢ ͓Ζ͍اը
Producer ݩRailsΤϯδχΞ ύογϣϯ͍͢͝ Engineer A αʔόʔڧ͍ Webϑϩϯτڧ͍ Πϯϑϥڧ͍ DDDಡॻձͱ͔Δਓ Engineer
B ৽ଔ αʔόʔڧ͍ Webϑϩϯτڧ͍ σβΠϯڧ͍ Designer ݩΞϓϦΤϯδχΞ ͔ͩΒΊͬͪΌΓ͍͢ ͓Ζ͍اը ΞϓϦΤϯδχΞ ͕͍ͳ͍ʂ
Designer ݩΞϓϦΤϯδχΞ ͔ͩΒΊͬͪΌΓ͍͢ ผ݅Ͱ ͱҰॹʹࣄͨ͠
Designer ݩΞϓϦΤϯδχΞ ͔ͩΒΊͬͪΌΓ͍͢ ผ݅Ͱ ͱҰॹʹࣄͨ͠ ͍ͭ͜Ͱ͑͑Μʂʂ
Producer ݩRailsΤϯδχΞ ύογϣϯ͍͢͝ Engineer A αʔόʔڧ͍ Webϑϩϯτڧ͍ Πϯϑϥڧ͍ DDDಡॻձͱ͔Δਓ Engineer
B ৽ଔ αʔόʔڧ͍ Webϑϩϯτڧ͍ σβΠϯڧ͍ Designer ݩΞϓϦΤϯδχΞ ͔ͩΒΊͬͪΌΓ͍͢ ͓Ζ͍اը
Producer ݩRailsΤϯδχΞ ύογϣϯ͍͢͝ Engineer A αʔόʔڧ͍ Webϑϩϯτڧ͍ Πϯϑϥڧ͍ DDDಡॻձͱ͔Δਓ Engineer
B ৽ଔ αʔόʔڧ͍ Webϑϩϯτڧ͍ σβΠϯڧ͍ Designer ݩΞϓϦΤϯδχΞ ͔ͩΒΊͬͪΌΓ͍͢ ͓Ζ͍اը Զ iOS ڧ͍ αʔόʔͪΐͬͱڧ͍ Ϟς͍ͨ
͜ͷνʔϜͷڧΈ • ࠷ۙͰ͋ΔࣗͷෆΛղܾ͍ͨ͠ਓͨͪͷू·Γ • શһΤϯδχΞ or ΤϯδχΞΛܦݧ͍ͯ͠Δ • Webʹ໌Δ͍ •
DDDΛ࣮ફ͍ͨ͠ͱࢥͬͯΔ • ଞͷϓϥοτϑΥʔϜʹखΛग़͍ͨ͠ҙཉຬʑʢEngineer A Engineer BiOSΓ͍ͨͱࢥͬͯΔʣ
͕͜ͷνʔϜͰΓ͍ͨ͜ͱ • ΞΠσΟΞΛߴ͔ͭߴ࣭ʹ࣮ݱɺͦͯ͠ϦϦʔε͍ͨ͠ • iOSΞϓϦ։ൃͷઙ͍νʔϜϝϯόʔʹͱͬͯग़དྷΔݶΓෑ ډͷ͍ͷʹ͍ͨ͠ • iOS ͷ Redux
࣮ʹڵຯ͕͋ͬͨʢͳΜ͔৽͍͜͠ͱΓ ͍ͨʣ • ihara ʹΞϯαʔιϯάΛॻ͖͔ͨͬͨ (https://tech.recruit- mp.co.jp/mobile/post-12398/)
͜ͷνʔϜͷڧΈ • ࠷ۙͰ͋ΔࣗͷෆΛղܾ͍ͨ͠ਓͨͪͷू·Γ • શһΤϯδχΞ or ΤϯδχΞΛܦݧ͍ͯ͠Δ • Webʹ໌Δ͍ •
DDDΛ࣮ફ͍ͨ͠ͱࢥͬͯΔ • ଞͷϓϥοτϑΥʔϜʹखΛग़͍ͨ͠ҙཉຬʑʢEngineer A Engineer BiOSΓ͍ͨͱࢥͬͯΔʣ
͜ͷνʔϜͷڧΈ • ࠷ۙͰ͋ΔࣗͷෆΛղܾ͍ͨ͠ਓͨͪͷू·Γ • શһΤϯδχΞ or ΤϯδχΞΛܦݧ͍ͯ͠Δ • Webʹ໌Δ͍ •
DDDΛ࣮ફ͍ͨ͠ͱࢥͬͯΔ • ଞͷϓϥοτϑΥʔϜʹखΛग़͍ͨ͠ҙཉຬʑʢEngineer A Engineer BiOSΓ͍ͨͱࢥͬͯΔʣ
Redux + Passive MVP + Clean Arch(Essence)
Why Redux?
Why Redux? • ͱʔʔʔʔ͍ͬͯ͠ΞϓϦͷঢ়ଶཧʹରͯ͠ʮখ ͍֓͞೦ͱ࣮Ͱେ͖ͳΛղܾ͍ͯ͠ΔʯReSwift ʢReduxʣ͕ඇৗʹඒ͍͠ͱײ͍ͯͨ͡ʢhttp:// in.fablic.co.jp/entry/reswiftʣ • ϝϯόʔ͕Webʹ໌Δ͍ͷͰReduxΛಋೖ͔ͬͨ͢͠ •
ΞϓϦͷঢ়ଶʹਅ͔ͬΒཱ͔ͪ͏͜ͱͰ࣮લʹ ʹؾ͚ΔΑ͏ʹ͔ͨͬͨ͠
Why Passive MVP?
Why Passive MVP?
Why Passive MVP? ͓લͩʔʂʂ
Why Passive MVP? • ϞόΠϧΞϓϦʹ͓͚Δ View ͻͱ͜ͱͰ·ͱΊΒΕͳ ͍͙Β͍ෳࡶͰ͍͠ • UIKit
ಠࣗͷ͜ͱʢIBͱ͔ಛʹʣ • Ξχϝʔγϣϯͱ͔ • DIͲ͏͢ΜͶΜͱ͔ • View Controller ͬͯͳΜͶΜͱ͔
Why Passive MVP? • ͨͩͰ͍͑͞͠Ϗϡʔͷ࣮ʹ Redux ͩͱ͔ݻ༗ͷٕ ज़Λॻ͖ͨ͘ͳ͔ͬͨʢData Binding ͩͱͯͦ͠͏ʣ
• Ͱ iOS ॳ৺ऀʹͱͬͯɺΓ͍͢ͷͬͺΓ Ϗϡʔ • Ϗϡʔʹ͍͜͠ͱΛॻ͔ͳ͍͜ͱͰ Engineer Aɺ Engineer BɺDesignerखΛ͚ΒΕΔΑ͏ʹ͔ͨͬ͠ ͨ
Why Clean Arch(Essence)?
Producer ݩRailsΤϯδχΞ ύογϣϯ͍͢͝ Engineer A αʔόʔڧ͍ Webϑϩϯτڧ͍ Πϯϑϥڧ͍ DDDಡॻձͱ͔Δਓ Engineer
B ৽ଔ αʔόʔڧ͍ Webϑϩϯτڧ͍ σβΠϯڧ͍ Designer ݩΞϓϦΤϯδχΞ ͓Ζ͍اը Զ iOS ڧ͍ αʔόʔͪΐͬͱڧ͍
Producer ݩRailsΤϯδχΞ ύογϣϯ͍͢͝ Engineer A αʔόʔڧ͍ Webϑϩϯτڧ͍ Πϯϑϥڧ͍ DDDಡॻձͱ͔Δਓ Engineer
B ৽ଔ αʔόʔڧ͍ Webϑϩϯτڧ͍ σβΠϯڧ͍ Designer ݩΞϓϦΤϯδχΞ ͓Ζ͍اը Զ iOS ڧ͍ αʔόʔͪΐͬͱڧ͍ ͓લͩʔʂʂ
Why Clean Arch(Essence)? • UIʢը໘αΠζʹىҼ͢ΔͷɺUIKit߹ͱ͔ʣWebAPIɺ͋ Δ͍DBʹґଘ͠ͳ͍Α͏ʹϏδωεϩδοΫΛॻ͖͔ͨͬͨ • ΞϓϦͱͯ͜͠ΕΛઌʹٞࣔ͢͜͠ͱͰɺUI/WebAPI/DBΛຊ དྷ͋Δ͖࢟ʹಋ͖͔ͨͬͨ •
ΈΜͳ༏͍͔͠ΒدΓ͕ͪʹͳΔ • DDDʹڵຯͷΤϯδχΞ͕͍Δ͜ͱͰɺಋೖָ͕ͩࣗ͠વͩͱ அͨ͠
Redux + Passive MVP + Clean Arch(Essence) ΒͷνʔϜʹ ԿΛͨΒ͍ͯ͠Δ͔
Redux’ s cons? • ΞϓϦͷঢ়ଶΛపఈͯ͠໌Β͔ʹ͠ͳ͚Εͳ Βͳ͍͔Βਏͦ͏… • ঢ়ଶͱΜͰͳ͍͜ͱʹͳΒͳ͍ʁ • ΞϓϦը໘Ҏ֎ʹWebAPI,ετϨʔδ,σό
Πεͱ͔ͨ͘͞Μ͖߹Θͳ͚ΕͳΒͳ͍ ͷ…
ͪΐͬͱͬͯʂ
ͦΕ࣮͚ͬͯͩͷʁ
ΞϓϦͷঢ়ଶΛෳࡶԽͤ͞ΔཁҼ • ༷͕ෳࡶ • ը໘͕ෳࡶ • ͦͦΞϓϦ։ൃ͕ෳࡶ • etc…
Producer ݩRailsΤϯδχΞ Engineer A αʔόʔڧ͍ Webϑϩϯτڧ͍ Πϯϑϥڧ͍ DDDಡॻձͱ͔Δਓ Engineer B
৽ଔ αʔόʔڧ͍ Webϑϩϯτڧ͍ σβΠϯڧ͍ Designer ݩΞϓϦΤϯδχΞ ͓Ζ͍اը Զ iOS ڧ͍ αʔόʔͪΐͬͱڧ͍
ReduxΛಋೖ͢Δ͜ͱͰ • ϝϯόʔશһ͕ঢ়ଶΛҙࣝ͢ΔΑ͏ʹͳΔ • શһΤϯδχΞ͔ͩΒεςʔτϚγϯਤॻ͚ Δ͠ಡΊΔ • ࣮ɾϦϦʔε͢Δͬͱͬͱલʹؾ͚ Δ
ແବʹෳࡶͰ͍͠ ࣮Λະવʹ͛Δ ʢෳࡶͳঢ়ଶΛϢʔβʔʹ ڧ͍Δલʹ…ʣ
ίεύ͑͑Μʂ
Passive MVPΛಋೖ͢Δ͜ͱͰ • ϝϯόʔશһ҆৺ͯ͠Ϗϡʔ͔ΒiOS։ൃΛֶ ΔΑ͏ʹͳΔ • ϏϡʔΛॻ͍ͯΔͱ͖Ϗϡʔͷ͜ͱ͚ͩϨ Ϗϡʔ͢Εྑ͍ͷͰָʢଞ͔͠Γʣ
ίεύ͑͑Μʂ
Clean Arch(Essence)Λಋೖ͢Δ͜ͱͰ • UIWebAPI͕ΞϓϦʹҾͬுΒΕͣʹઃܭͰ ͖͍ͯΔ • ΞταΠυΠϯͳTDDΛ࣮ફ͍͢͠
ίεύ͑͑Μʂ
Redux + Passive MVP + Clean Arch(Essence) Λࢧ͑Δٕज़
ReSwift Swinject/SwinjectStoryboard
ΒͷνʔϜͷiOS։ൃΛࢧ͑Δٕज़
SwiftLint OHTTPStubs Quick/Nimble Nimble-Snapshots RxSwift APIKit Fastlane CircleCI DeployGate
͕Γ͍ͨ͜ͱ αʔϏεͷ࣮ݱํ๏ʹ৭ΜͳྖҬ͕͋ͬͯɺ ͦΕͧΕͰ৽͍͠ύϥμΠϜ͕࢈·Εͯফ͑ ͯ͘தͰɺΞϓϦΤϯδχΞͱͯ͠ɺ࣋ͪ͏Δ ͋ΒΏΔྗΛۦͯ͠ΠϯϐʔμϯεϛεϚο νΛίεύΑ͘ղফ͠ɺΑΓྑ͘ɾΑΓૣ͘ ՁΛಧ͚Δɻ
܈༤ׂڌͰ ೖΕସΘΓܹ͍͠ࡢࠓ
Redux + Passive MVP + Clean Arch(Essence) Λࢼͯ͠Έͯʂ
Apendixʢ͋Γ͕ͱ͏͍͟͝·͢ʣ • https://speakerdeck.com/ninjinkun/reactive-swift-meetup • https://blog.fenrir-inc.com/jp/2017/08/ios-redux.html • http://blog.j5ik2o.me/entry/2016/09/09/200643 • https://news.realm.io/jp/news/krzysztof-zablocki- mDevCamp-ios-architecture-mvvm-mvc-viper
• https://speakerdeck.com/mpon/unidirectional-data-flow- in-reswift
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠