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版の開発手順書 - みてねのMeetup#1 / mitene ios deve...
Search
atsushisakai
June 29, 2018
Programming
4
2.1k
みてね iOS版の開発手順書 - みてねのMeetup#1 / mitene ios development steps
2018/6/29 Fri. "みてねのMeetup#1" で発表したスライドです。
iOS版の開発について順をおって説明しました。
atsushisakai
June 29, 2018
Tweet
Share
More Decks by atsushisakai
See All by atsushisakai
大規模 SaaS の技術的意思決定を支える三要素 / Three elements that support technical decision-making for large-scale SaaS
_atsushisakai
0
930
一方、私はなぜEMでありつづけるか / TECH TRACK vol.1
_atsushisakai
0
420
子育てとEMと転職と
_atsushisakai
2
760
「家族アルバム みてね」を支える エンジニアリング組織/introduce-familyalbum-engineering-team
_atsushisakai
2
210
ミクシィのマネージャーは悩んでいる / mixi's manager is in trouble
_atsushisakai
16
14k
実践 Engineering Manager / practice engineering manager
_atsushisakai
19
8k
Scalable Microservice for Media Transcoding / Transcoder
_atsushisakai
4
1.5k
New Relic {FUTURE} STACK 3/14, 2019 / newrelic_future_stack
_atsushisakai
1
1.5k
実践 WorkManager / WorkManager
_atsushisakai
3
7.3k
Other Decks in Programming
See All in Programming
Symfony Mapper Component
soyuka
2
730
Security_for_introducing_eBPF
kentatada
0
110
Effective Signals in Angular 19+: Rules and Helpers @ngbe2024
manfredsteyer
PRO
0
130
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
700
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
1
440
DevFest Tokyo 2025 - Flutter のアプリアーキテクチャ現在地点
wasabeef
5
900
14 Years of iOS: Lessons and Key Points
seyfoyun
1
770
Scalaから始めるOpenFeature入門 / Scalaわいわい勉強会 #4
arthur1
1
300
数十万行のプロジェクトを Scala 2から3に完全移行した
xuwei_k
0
270
Go の GC の不得意な部分を克服したい
taiyow
2
770
Beyond ORM
77web
2
330
StarlingMonkeyを触ってみた話 - 2024冬
syumai
3
270
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
427
64k
Writing Fast Ruby
sferik
628
61k
The Cost Of JavaScript in 2023
addyosmani
45
7k
GraphQLとの向き合い方2022年版
quramy
44
13k
Automating Front-end Workflow
addyosmani
1366
200k
RailsConf 2023
tenderlove
29
940
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
17
2.3k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Fireside Chat
paigeccino
34
3.1k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Producing Creativity
orderedlist
PRO
341
39k
Transcript
iOS൛ͷ։ൃखॱॻ @_atsushisakai ΈͯͶͷMeetup #1
ࣗݾհ ञҪ ಞ @_atsushisakai • 201111݄ ϛΫγΟೖࣾ • 2012ʙ2014 SNS
mixiʹؔ࿈ͨ͠ECܥͷ৽نࣄۀΛෳ։ൃ • 2014ʙ ΈͯͶۀ࣌ʹiOSΤϯδχΞͱͯ͠ࢀՃ • 20174݄ʙ ΈͯͶࣄۀ෦ ։ൃάϧʔϓϚωʔδϟ • 20181݄ʙ SREνʔϜॴଐɺΠϯϑϥઐ೦ɺߴԽɾෛՙࢄ
͢͜ͱ • iOS൛ΈͯͶɺԿΛߟ͑ͯઃܭ͞ΕɺͲͷΑ͏ʹ։ൃΛߦ͍ͬͯΔ͔ • ΞʔΩςΫνϟࣗମͷͰͳ͘ɺ͋ΔΞʔΩςΫνϟͷ্Ͱ࣮ࡍʹͲ͏ ։ൃ͍ͯ͠Δ͔ • Kyashͷ@konifar͞ΜʹӨڹΛड͚ͨൃද • https://drive.google.com/file/d/
1rlL1AdE5R_M1UAxVW_lY4orFTIEBfFJY/view
iOS൛ΈͯͶͷࣦഊ • ίʔυ্ͷࣦഊ • MVC ( or MVP) • FatViewController
• ඈͼަ͏NSNotification • ґଘ͕ؔແͳSingletonͷେྔൃੜ • ωετ͠·͘ΔObjective-C block, Swift Closure • ͱΓ͋͑ͣManager • ແҙຯʹੜ͑ΔExtension • વͷΑ͏ʹଘࡏ͠ͳ͍ςετίʔυ ɹ…
iOS൛ΈͯͶͷࣦഊ • ίʔυ͕ϏδωεʹѱӨڹΛͨΒ͢ • ଐਓԽ • ϞνϕʔγϣϯԼ • ݟੵΓਫ਼ͷԼ •
CSελοϑʹ͠Θدͤ
ΞʔΩςΫνϟ৽ • 20181݄͝Ζʹ࣮ࢪ • ଟਓ։ൃʹ͑͏Δͷʹ͍ͨ͠ • ςετΛॻ͘ʢॻ͚ΔΑ͏ʹ͢Δʣ • ॻ͘ՕॴΛ໌֬ʹنఆ͢Δʢॻ͔ͳ͍͍ͯ͘ͱ͜Ζॻ͔ͳ͍ʣ •
ԿΛ࡞Δ͔ɺࣄલʹѲՄೳ • ॳΊͯͷਓͰා͘ͳ͍
λʔχϯάϙΠϯτ • bufferapp/android-clean-architecture-boilerplate • KotlinͰClean ArchitectureΛ࣮ͨ͠AndroidΞϓϦͷαϯϓϧίʔυ • ͦͷ··ͦͬ͘ΓiOS/Swiftʹస༻Ͱ͖Δ • ࣗͷΞϓϦͰ͍ͬͯ͘ؾ͕࣋ͪߴ·ͬͨ
େํ • MVP • PresenterͷςετΛॻ͖ViewControllerΛബ͘͢Δ • CleanArchitecture • ModelϨΠϠʔΛཧ͠ɺڊେͳPresenterManagerʹ͠ͳ͍ •
RxSwiftΛઃܭʹऔΓೖΕͯඇಉظॲཧͷՄಡੑΛߴΊΔ • ςετΛॻ͘
UI Presentation Domain Presenter View ViewController PresenterImpl UseCase Mapper Model
ҹґଘؔ
Domain Data Remote UseCase Mapper Model ҹґଘؔ Repository RepositoryImpl Mapper
Model Cache DataSource DataSourceImpl Entity DataSourceImpl Entity
ͦΕͰ։ൃ͍͖ͯ͠·͢
1: ͋͘·ͰαϯϓϧίʔυͰ͢
2: શମతʹ͔ͳΓলུ͍ͯ͠·͢
Ҋ݅հ
• ۙگ (Recents) ը໘ • ϢʔβʔͷΞΫςΟϏςΟΛྲྀ͢ϑΟʔυUI • API͔ΒϑΟʔυͷListΛऔಘ • આ໌Λ؆қతʹ͢ΔͨΊCache͠ͳ͍
• APIೲ͕Ε͍ͯΔʂʢઃఆʣ
Domain • UseCase͔ΒऔΓग़ͨ͠Βग़ͯ͘ΔΦϒδΣΫτ • ϑΟʔυͷͻͱͭʹ૬͢Δ
Domain • UseCase͕ґଘ͢ΔRepositoryͷΠϯλʔϑΣʔε • SingleΦϒδΣΫτͱͯ͠ඇಉظʹΦϒδΣΫτΛฦ͢
Domain
Domain RepositoryͷΠϯλʔϑΣʔεʹґଘͤ͞Δ Repository͔ΒσʔλΛऔΓग़͢
ࢀߟ (kotlin) • ϕʔεΫϥε SingleUseCase.kt • https://github.com/bufferapp/android-clean-architecture-boilerplate/ blob/master/domain/src/main/java/org/buffer/android/boilerplate/ domain/interactor/SingleUseCase.kt
ςετΛॻ͍ͯ͜͜ͰPull Request
Presentation • நԽ͞ΕͨViewͷProtocolΛఆٛ • Presenter͜ͷViewʹରͯ͠දࣔΛࢦࣔ͢ΔΑ͏ʹॻ͘
Presentation • Presenterʹ࣮͖͢ProtocolΛఆٛɻ • ViewControllerϥΠϑαΠΫϧ্ͰPresenterͷ֤ॲཧΛ࣮ߦ͢Δ
Presentation
Presentation ViewΛऑࢀর ݁ՌΛViewʹө͢Δ
ςετΛॻ͍ͯ͜͜ͰPull Request
User Interface
User Interface Presenterʹॲཧ͕ॻ͍ͯ͋Δ RecentViewΛConform
͜ͷ࣌ͰLayoutͯ͠σʔλΛදࣔͤ͞Δ
ςετॻ͔ͳ͍ͰOKɺPull Request
APIͰ͖ͨʁ
Data
Data DataϨΠϠʔͰѻ͏ΦϒδΣΫτ
Data DataϨΠϠʔͰѻ͏ΦϒδΣΫτ͔Β DomainϨΠϠʔͰѻ͏ΦϒδΣΫτʹTranslate͢Δ
ςετΛॻ͍ͯ͜͜ͰPull Request
Remote
ͦΖͦΖ࣌ؒͳ͍ͷͰAPIClientͷ۩ମతͳ࣮লུ͠·͢
ςετΛॻ͍ͯ͜͜ͰPull Request
αʔόʔͱ݁߹ͯ͠ಈ࡞֬ೝʂ
࣮खॱͷ·ͱΊ • ґଘ͕ؔཧ͞Ε͍ͯΔͷͰॱংཱ࣮͍ͯͯ͢͠ • API/Cache͕ͳͯ͘UseCase͕ฦ͢ϞσϧΛͰͬͪ͋͛Ε͙͢ʹ࣮ ͍͚ͬͯΔ • ϨΠϠʔΛ͑Δͱ͖جຊతʹProtocolґଘ͢Δ • ςετॻ͘ͱ͜Ζͱॻ͔ͳ͍ͱ͜ΖͷϝϦϋϦΛ͚ͭΔ
͞Ε͍ͯΔ՝ • Clean ArchitectureΛͲ͜·Ͱݫີʹ͍͔ͬͯ͘ • ϑΝΠϧ͕ଟ࣮͕ͯ͘େม • ίʔυςϯϓϨʔτͳͲΛۦͯ͠ؾָʹ͍͖͍ͯͨ͠ • ґଘؔղܾ͕͍͍ͪͪෳࡶ
• SwinjectͳͲDI Containerͷಋೖ͕ඞવతʹͳ͖ͬͯͨ • Embedded FrameworkԽ͍ͯ͠ͳ͍ • ґଘؔͷϧʔϧΛ؆୯ʹഁͬͯ͠·͏͜ͱ͕Ͱ͖Δ • ۃʹݴ͏ͱ Presenter͕APIΫϥΠΞϯτΛؾܰʹୟ͘͜ͱՄೳͱ͍͑Մೳ
ΞʔΩςΫνϟ৽ͷޮՌ • ͱΓ͋͑ͣίʔυΛॻ͘ͷ͕ਏ͘ͳָ͍ͯ͘͠ • ςετΛॻ͘͜ͱ͕વͷۭؾʹͳΓίʔυϨϏϡʔָνϯ • ා͘ͳ͍ • ΛݟੵΔ͜ͱ͕Ͱ͖Δ •
࣮QA࣌ͷόάͷͳͲ͜Ε͔Β͏গ͠ੳ͍͖͍ͯͨ͠
͋Γ͕ͱ͏͍͟͝·ͨ͠