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
Can We Measure Developer Productivity?
ewolff
1
150
The Role of Developer Relations in AI Product Success.
giftojabu1
0
120
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
250
AWS Lambda のトラブルシュートをしていて思うこと
kazzpapa3
2
170
Lexical Analysis
shigashiyama
1
150
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
8
870
Lambdaと地方とコミュニティ
miu_crescent
2
370
スクラム成熟度セルフチェックツールを作って得た学びとその活用法
coincheck_recruit
1
140
Platform Engineering for Software Developers and Architects
syntasso
1
520
[CV勉強会@関東 ECCV2024 読み会] オンラインマッピング x トラッキング MapTracker: Tracking with Strided Memory Fusion for Consistent Vector HD Mapping (Chen+, ECCV24)
abemii
0
220
Terraform CI/CD パイプラインにおける AWS CodeCommit の代替手段
hiyanger
1
240
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
200
Featured
See All Featured
Faster Mobile Websites
deanohume
305
30k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
BBQ
matthewcrist
85
9.3k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Happy Clients
brianwarren
98
6.7k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Building Your Own Lightsaber
phodgson
103
6.1k
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ͷΞϓϦΛ࠶ߏஙͨ͠ • ΞϓϦ։ൃ͍͠ • ιϑτΣΞΞʔΩςΫνϟʔͷબʹΑΓૣ͍։ൃΛอͪͭͭɺॊ ೈੑɺݎ࿚ੑɺ࠶ར༻ੑͷߴ͍ίʔυΛҡ࣋͘͢͠ͳΔ • ʹͳΓ͗͢ͳ͍Α͏ʹɺ։ൃΛ͠ͳ͕ΒɺඞཁʹԠͯ͡ઃܭͨ͠
• ։ൃମ੍ΞϓϦͷཁ݅ʹ͋Θͤͯ࠷దղมΘΔ ·ͱΊ