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
Go の GC の不得意な部分を克服したい
taiyow
3
790
CSC305 Lecture 26
javiergs
PRO
0
140
17年周年のWebアプリケーションにTanStack Queryを導入する / Implementing TanStack Query in a 17th Anniversary Web Application
saitolume
0
250
rails statsで大解剖 🔍 “B/43流” のRailsの育て方を歴史とともに振り返ります
shoheimitani
2
930
ゆるやかにgolangci-lintのルールを強くする / Kyoto.go #56
utgwkk
2
390
Jakarta EE meets AI
ivargrimstad
0
240
testcontainers のススメ
sgash708
1
120
KMP와 kotlinx.rpc로 서버와 클라이언트 동기화
kwakeuijin
0
140
Monixと常駐プログラムの勘どころ / Scalaわいわい勉強会 #4
stoneream
0
280
fs2-io を試してたらバグを見つけて直した話
chencmd
0
230
useSyncExternalStoreを使いまくる
ssssota
6
1k
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
410
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Building Adaptive Systems
keathley
38
2.3k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Code Reviewing Like a Champion
maltzj
520
39k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
Making Projects Easy
brettharned
116
5.9k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Designing Experiences People Love
moore
138
23k
Facilitating Awesome Meetings
lara
50
6.1k
Docker and Python
trallard
42
3.1k
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࣌ͷόάͷͳͲ͜Ε͔Β͏গ͠ੳ͍͖͍ͯͨ͠
͋Γ͕ͱ͏͍͟͝·ͨ͠