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
890
一方、私はなぜEMでありつづけるか / TECH TRACK vol.1
_atsushisakai
0
410
子育てとEMと転職と
_atsushisakai
2
750
「家族アルバム みてね」を支える エンジニアリング組織/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
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
10
1.3k
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
110
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.7k
3rd party scriptでもReactを使いたい! Preact + Reactのハイブリッド開発
righttouch
PRO
1
600
Contemporary Test Cases
maaretp
0
140
ペアーズにおけるAmazon Bedrockを⽤いた障害対応⽀援 ⽣成AIツールの導⼊事例 @ 20241115配信AWSウェビナー登壇
fukubaka0825
6
1.9k
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
120
cmp.Or に感動した
otakakot
2
150
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
100
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
Featured
See All Featured
Practical Orchestrator
shlominoach
186
10k
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
Raft: Consensus for Rubyists
vanstee
136
6.6k
Adopting Sorbet at Scale
ufuk
73
9.1k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
410
Into the Great Unknown - MozCon
thekraken
32
1.5k
For a Future-Friendly Web
brad_frost
175
9.4k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
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࣌ͷόάͷͳͲ͜Ε͔Β͏গ͠ੳ͍͖͍ͯͨ͠
͋Γ͕ͱ͏͍͟͝·ͨ͠