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
960
一方、私はなぜEMでありつづけるか / TECH TRACK vol.1
_atsushisakai
0
430
子育てとEMと転職と
_atsushisakai
2
770
「家族アルバム みてね」を支える エンジニアリング組織/introduce-familyalbum-engineering-team
_atsushisakai
2
220
ミクシィのマネージャーは悩んでいる / 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
Scalaから始めるOpenFeature入門 / Scalaわいわい勉強会 #4
arthur1
1
380
競技プログラミングへのお誘い@阪大BOOSTセミナー
kotamanegi
0
380
Fibonacci Function Gallery - Part 1
philipschwarz
PRO
0
260
毎日13時間もかかるバッチ処理をたった3日で60%短縮するためにやったこと
sho_ssk_
1
480
HTML/CSS超絶浅い説明
yuki0329
0
140
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
710
fs2-io を試してたらバグを見つけて直した話
chencmd
0
270
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
1
500
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
220
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
360
情報漏洩させないための設計
kubotak
5
1.2k
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
1.2k
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
850
Writing Fast Ruby
sferik
628
61k
Embracing the Ebb and Flow
colly
84
4.5k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Code Review Best Practice
trishagee
65
17k
What's in a price? How to price your products and services
michaelherold
244
12k
Navigating Team Friction
lara
183
15k
Agile that works and the tools we love
rasmusluckow
328
21k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.1k
It's Worth the Effort
3n
183
28k
A better future with KSS
kneath
238
17k
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࣌ͷόάͷͳͲ͜Ε͔Β͏গ͠ੳ͍͖͍ͯͨ͠
͋Γ͕ͱ͏͍͟͝·ͨ͠