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
Presentation with Coordinators
Search
Yusuke Kawanabe
January 10, 2018
Technology
4
750
Presentation with Coordinators
Yusuke Kawanabe
January 10, 2018
Tweet
Share
More Decks by Yusuke Kawanabe
See All by Yusuke Kawanabe
Gunosy for Apple Watchができるまで
ykawanabe
6
820
Other Decks in Technology
See All in Technology
初心者に Vue.js を 教えるには
tsukuha
5
390
Apple/Google/Amazonの決済システムの違いを踏まえた定期購読課金システムの構築 / abema-billing-system
cyberagentdevelopers
PRO
1
220
大規模データ基盤チームのオンプレTiDB運用への挑戦 / dpu-tidb
cyberagentdevelopers
PRO
1
110
Product Engineer Night #6プロダクトエンジニアを育む仕組み・施策
hacomono
PRO
1
470
一休.comレストランにおけるRustの活用
kymmt90
3
580
omakaseしないための.rubocop.yml のつくりかた / How to Build Your .rubocop.yml to Avoid Omakase #kaigionrails
linkers_tech
3
740
pandasはPolarsに性能面で追いつき追い越せるのか
vaaaaanquish
4
4.6k
プロダクトチームへのSystem Risk Records導入・運用事例の紹介/Introduction and Case Studies on Implementing and Operating System Risk Records for Product Teams
taddy_919
1
170
Amazon FSx for NetApp ONTAPを利用するにあたっての要件整理と設計のポイント
non97
1
160
Amazon_CloudWatch_ログ異常検出_導入ガイド
tsujiba
4
1.6k
Jr. Championsになって、強く連携しながらAWSをもっと使いたい!~AWSに対する期待と行動~
amixedcolor
0
190
「視座」の上げ方が成人発達理論にわかりやすくまとまってた / think_ perspective_hidden_dimensions
shuzon
2
3.6k
Featured
See All Featured
Producing Creativity
orderedlist
PRO
341
39k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.8k
Building an army of robots
kneath
302
42k
The Language of Interfaces
destraynor
154
24k
The Cult of Friendly URLs
andyhume
78
6k
Into the Great Unknown - MozCon
thekraken
31
1.5k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
A Philosophy of Restraint
colly
203
16k
What's new in Ruby 2.0
geeforr
342
31k
The Cost Of JavaScript in 2023
addyosmani
45
6.6k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
3
370
Transcript
Presentation with Coordinators Yusuke Kawanabe (@ykawanabe)
2 Yusuke Kawanabe (@ykawanabe) • San FranciscoͰConnected Food SensorͷΞϓϦΛ։ൃ •
ʮiOS 11 ProgrammingʯͰୈ8ষ ʮUIKitͷΨΠυϥΠϯ ͷมߋͱAutoLayoutͷ৽ػೳɺΞοϓσʔτʯΛ୲ • ʮΑ͘Θ͔ΔAuto Layoutʯஶऀ • 2017͔ΒτϥΠΞεϩϯΛ͡ΊϋʔϑΞΠΞϯϚϯʹ Lead iOS Engineer at Nima
3 Nima • ੈքॳͷϙʔλϒϧάϧςϯηϯαʔٴͼ ϐʔφοπηϯαʔʹΑͬͯɺ৯ʹ҆৺ Λಧ͚͍ͯΔ • CES 2016ͷTechCrunch Hardware
Battlefieldʹͯ༏উ • CES 2018ʹͯϐʔφοπηϯαʔΛൃද
4 ΞϓϦ։ൃ͍͠
5 •ྫ͑ɺϑϦϚΞϓϦʹͯɺ ϩάΠϯը໘ΛɺΞϓϦىಈ ͔࣌Βબޙʹมߋ͢Δ A/BςετΛ͍ͨ͠ͳͲɻ UIશվम •ݟͨͷϦχϡʔΞϧɻ࠷ऴ తʹΞϓϦΛ࠶ߏங͢Δඞ ཁʹഭΒΕΔ͜ͱ͕ଟ͍ •ྫ͑MVVMΛ࠾༻ͨ͠
߹ʹɺView ModelʹϏδωε ϩδοΫ͕ूத͠ͳView Modelͱͳͬͯ͠·͏ͳͲɻ Ϣʔβʔϑϩʔมߋ ࠶ར༻ੑͷ͞ Ή͔͠ࠔͬͨ͜ͱ
6 ॊೈੑɺݎ࿚ੑɺ࠶ར༻ੑ Λߟ͑ΞϓϦΛ࠶ߏங͓ͨ͠
7 NimaͰʁ
8 NimaΞϓϦͰͰ͖Δ͜ͱ
9 NimaΞϓϦઃܭ֓ཁ Coordinator Scene View Controller View Model Context Interactor
Model Model Presentation Use Case Business Logic Use Case View
10 NimaΞϓϦઃܭ֓ཁ Coordinator Scene View Controller View Model Context Interactor
Model Model Presentation Use Case Business Logic Use Case View
11 NimaΞϓϦઃܭ֓ཁ Coordinator Scene View Controller View Model Context Interactor
Model Model View • Use caseୡΛཧ͢ΔΫϥε • ྫʣϢʔβʔϨετϥϯҰཡΛऔಘͰ͖Δ Presentation Use Case Business Logic Use Case
12 NimaΞϓϦઃܭ֓ཁ Coordinator Scene View Controller View Model Context Interactor
Model Model Presentation Use Case Business Logic Use Case View
Presentation Use Case Business Logic Use Case 13 NimaΞϓϦઃܭ֓ཁ Coordinator
Scene View Controller View Model Context Interactor Model Model View • MVVMͰͷView Modelͱಉ༷ͷׂ • දࣔʹඞཁͳঢ়ଶͷอ࣋ͱɺView Controller͔Βͷೖྗཧ • ͍ࣺͯ • MVVMͰͷView Controllerͱಉ༷ͷׂ • ViewͱView ModelΛܨ͙ͷΈ • View ControllerՄೳͳݶΓΞϗʹ • ͍ࣺͯ
14 NimaΞϓϦઃܭ֓ཁ Coordinator Scene View Controller View Model Context Interactor
Model Model View • ϓϨθϯςʔγϣϯϢʔεέʔεΛཧ͢Δ • e.g. ϢʔβʔొϑϩʔɺϨετϥϯݕࡧϑ ϩʔͳͲ Presentation Use Case Business Logic Use Case
15 Coordinator App Coordinator Coordinator Navigation Coordinator Scene Coordinator
16 Scene Coordinators and Scenes Scene Scene Coordinator •͋Δϑϩʔͷ֤ϏϡʔΛఆ͍ٛͯ͠ΔɻView ModelΛड͚औΓView
ControllerΛฦ͢ɻ •͋ΔϑϩʔΛఆ͍ٛͯ͠Δɻ֤View ModelΛ ࢹ࣍͠ͷSceneΛදࣔ͢Δɻ •͋Δϑϩʔʹ͓͚Δঢ়ଶΛอ࣋͢Δ •View Controller͕φϏήʔγϣϯʹؔ͢ΔࣝΛ ࣋ͨͳ͍ welcome signup Name signup Email signup Password
signup Password 17 Navigation Coordinator welcome signup Name signup Email
Welcome Scene Coordinator Restaurant Scene Coordinator Review Scene Coordinator •Scene CoordinatorୡΛཧ͠ɺΞϓϦͰͷը໘ભҠΛཧ͢Δɻ •্هͷΑ͏ͳΠϯλʔϑΣʔεΛ࣋ͪɺCoordinatorͷදࣔॱংΛཧ͢Δɻ •ϑϩʔͷೖΕସ͕͑༰қ
18 App Coordinator ىಈ Welcome Scene Coordinator Restaurant Scene Coordinator
•ΞϓϦىಈ࣌ͷը໘ఏڙΛཧ͢ΔɻͦͷͨΊɺKey WindowΛࢀর͠ɺಛఆͷϑϩʔΛ։࢝͢Δ •ىಈ࣌ͷॲཧΛɺApp Delegateʹॻ͔ͳͯ͘͢Ή ϩάΠϯࡁΈ ະϩάΠϯ Key window Λऔಘ Loading Scene Coordinator
19 Ͳ͏ղܾ͞Ε͔ͨ
20 •֤CoordinatorʹͯඞཁʹԠ ͯ͡ॱংΛมߋ͢ΔͷΈ UIશվम •View Controller͕Viewɺ View ModelͱͷଓΛ୲͢ ΔͷΈʹͳΔͷͰɺ෭࡞༻͕ ࠷খʹɻViewٴͼɺView
ControllerΛஔ͖͑ΔͷΈͰ ରԠՄೳɻ •ϓϨθϯςʔγϣϯͱϏδ ωεϩδοΫ͕໌֬ʹ͚Β Ε͍ͯΔͨΊɺϏδωεϩ δοΫ࠶ར༻ੑ͕ߴ͘ͳ Δɻ Ϣʔβʔϑϩʔมߋ ࠶ར༻ੑͷ͞ ΞϓϦ։ൃͰΑ͋͘ΔࠔΔ͜ͱ
21 ·ͱΊ
22 • NimaͷΞϓϦΛ࠶ߏஙͨ͠ • ΞϓϦ։ൃ͍͠ • ιϑτΣΞΞʔΩςΫνϟʔͷબʹΑΓૣ͍։ൃΛอͪͭͭɺॊ ೈੑɺݎ࿚ੑɺ࠶ར༻ੑͷߴ͍ίʔυΛҡ࣋͘͢͠ͳΔ • ʹͳΓ͗͢ͳ͍Α͏ʹɺ։ൃΛ͠ͳ͕ΒɺඞཁʹԠͯ͡ઃܭͨ͠
• ։ൃମ੍ΞϓϦͷཁ݅ʹ͋Θͤͯ࠷దղมΘΔ ·ͱΊ