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
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
250
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.8k
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
430
CSC509 Lecture 13
javiergs
PRO
0
110
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
3
690
色々なIaCツールを実際に触って比較してみる
iriikeita
0
330
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
1.7k
初めてDefinitelyTypedにPRを出した話
syumai
0
420
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
120
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
120
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
260
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
900
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Fireside Chat
paigeccino
34
3k
How STYLIGHT went responsive
nonsquared
95
5.2k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Designing the Hi-DPI Web
ddemaree
280
34k
Scaling GitHub
holman
458
140k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
Side Projects
sachag
452
42k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
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
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠