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の設計と開発フローの変遷
Search
Yosuke Ishikawa
April 19, 2016
9
13k
アッテiOSの設計と開発フローの変遷
Yosuke Ishikawa
April 19, 2016
Tweet
Share
More Decks by Yosuke Ishikawa
See All by Yosuke Ishikawa
Achieving Testability in Presentation Layer
ishkawa
4
3.5k
Introducing Wire: Dependency Injection by Code Generator
ishkawa
12
1.2k
Declarative UICollectionView
ishkawa
28
7.6k
Nuxt.jsが掲げる"Universal Vue.js Applications"とは何者か
ishkawa
10
2.6k
Static Dependency Injection by Code Generation
ishkawa
15
6k
実践クライアントサイドSwift
ishkawa
24
4k
JSON-RPC on APIKit
ishkawa
5
50k
RxSwiftは開発をどう変えたか?
ishkawa
12
3.6k
Swift + JSON-RPC
ishkawa
0
47k
Featured
See All Featured
Teambox: Starting and Learning
jrom
131
8.7k
Intergalactic Javascript Robots from Outer Space
tanoku
268
26k
WebSockets: Embracing the real-time Web
robhawkes
59
7.3k
The Mythical Team-Month
searls
218
43k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
43
2k
Six Lessons from altMBA
skipperchong
26
3.4k
The World Runs on Bad Software
bkeepers
PRO
64
11k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
36
2.1k
Into the Great Unknown - MozCon
thekraken
29
1.4k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
5
480
Designing Dashboards & Data Visualisations in Web Apps
destraynor
227
52k
[RailsConf 2023] Rails as a piece of cake
palkan
48
4.6k
Transcript
ΞοςJ04ͷઃܭͱ ։ൃϑϩʔͷมભ 2016/04/18
ࣗݾհ 2 ੴ ༸ࢿ (ishkawa) • 20162݄ೖࣾͷiOSΤϯδχΞ • ΧϠοΫ →
LINE → ικ • ઃܭΛߟ͑Δͷ͕͖
INDEX 1. ಉ͡ߏͷ࣮ͷҰݩԽ 2. Ωϟογϡઓུ 3. σϓϩΠ
ಉ͡ߏͷ࣮ͷҰݩԽ
Α͋͘Δಉ͡ߏ 5 1. ϖʔδωʔγϣϯ 2. ϑΥʔϜͷόϦσʔγϣϯ
“ಉ͡ߏ”Λ୲͢ΔͷViewModel 6 6*7JFX$POUSPMMFS 6*7JFX "1*$MJFOU 6*Πϕϯτ ϦΫΤετ Ϩεϙϯε View ViewModel
Model 7JFX.PEFM දࣔ
ϖʔδωʔγϣϯ͕ඞཁͳՕॴ 7 1. λΠϜϥΠϯ 2. ͍͍ͶϦετ 3. ϝοηʔδ 4. ௨
5. ίϝϯτ
ϖʔδωʔγϣϯ͕ඞཁͳՕॴ 8 5JNFMJOF 7JFX$POUSPMMFS "1*$MJFOU 5JNFMJOF 7JFX.PEFM -JLFE0⒎FST 7JFX$POUSPMMFS -JLFE0⒎FST
7JFX.PEFM .FTTBHFT 7JFX$POUSPMMFS .FTTBHFT 7JFX.PEFM /PUJpDBUJPOT 7JFX$POUSPMMFS /PUJpDBUJPOT 7JFX.PEFM $PNNFOUT 7JFX$POUSPMMFS $PNNFOUT 7JFX.PEFM
ϖʔδωʔγϣϯ͕ඞཁͳՕॴ 9 5JNFMJOF 7JFX$POUSPMMFS "1*$MJFOU 1BHJOBUJPO 7JFX.PEFM&MFNFOU -JLFE0⒎FST 7JFX$POUSPMMFS .FTTBHFT
7JFX$POUSPMMFS /PUJpDBUJPOT 7JFX$POUSPMMFS $PNNFOUT 7JFX$POUSPMMFS
ԿΛύϥϝʔλʔԽ͢Δ͔ʁ 10 class PaginationViewModel<Element> { ... func bindRequest<Request: PaginationRequestType where
Request.Response.Element == Element>(baseRequest: Request) { ... } } • ϖʔδωʔγϣϯͷΤϨϝϯτ(Message, NotificationͳͲ) • ϖʔδωʔγϣϯͷͨΊͷϦΫΤετ
Ͳ͏࣮͢Δʁ 11 protocol PaginationRequestType: AtteRequestType { associatedtype Response: PaginationResponseType var
page: Int64 { get } } protocol PaginationResponseType { associatedtype Element var elements: [Element] { get } var hasNextPage: Bool { get } } • ϓϩτίϧͰ࣮ͷͨΊͷΛ༻ҙ • ϓϩτίϧͰఆٛͨ͠ΠϯλʔϑΣʔε͚ͩͰ࣮
ϖʔδωʔγϣϯ͕ඞཁͳՕॴ 12 5JNFMJOF 7JFX$POUSPMMFS "1*$MJFOU 1BHJOBUJPO 7JFX.PEFM&MFNFOU -JLFE0⒎FST 7JFX$POUSPMMFS .FTTBHFT
7JFX$POUSPMMFS /PUJpDBUJPOT 7JFX$POUSPMMFS $PNNFOUT 7JFX$POUSPMMFS
࣮ͷҰݩԽͰಘͨͷ 13 • ߴ • ҆શ
Ωϟογϡઓུͷมભ
ॳͷΩϟογϡઓུ 15 • RealmͰΩϟογϡΛऔΔ • ϨεϙϯεRealmͷObjectͱͯ͠දݱ
ॳͷΩϟογϡઓུͷ 16 Կ͔RealmͷObjectʹͳͬͯ͠·͏ͧ... • Կ͕ӬଓԽ͞Ε͍ͯΔͷ͔ܕ͔ΒผͰ͖ͳ͍ • আϙϦγʔ͕ෳࡶ • ϚΠάϨʔγϣϯର͕͘ͳΔ
ͦͦRealm͕୲ͬͯͨͷʁ 17 • ϨεϙϯεͷӬଓԽ • ը໘ؒͷมߋͷڞ༗
ϨεϙϯεͷӬଓԽ 18 ࣺͯͯྑ͍ͷύʔδલఏͷػߏͰอଘ͢Δ • LRUͷσΟεΫΩϟογϡͰJSONΛอଘ • อଘ͞ΕͨJSONͱܕʹෆ߹͕͋ΕJSONΛࣺͯΕྑ͍ • আϙϦγʔɾϚΠάϨʔγϣϯͷ৺͕ͳ͘ͳͬͨ
ϨεϙϯεͷӬଓԽ 19 ϨεϙϯεΛද͢ܕͷ੍ݶ͕ͳ͘ͳͬͨ • ҎલObjectMapperΛ͍ͬͯͨ • ݱࡏHimotokiʹҠߦࡁΈ • JSONͷόϦσʔγϣϯͱܕͷΠϯελϯεԽΛҰகͤ͞ΒΕͨ •
ෆਖ਼ͳJSONʹΑΔΤϥʔΛہॴతʹཹΊΔ͜ͱ͕Ͱ͖ͨ
ը໘ؒͷมߋͷڞ༗ 20 άϩʔόϧͳSubjectͰڞ༗ • ಉظಉظ͕ಘҙͳͷʹͤΔ(RxSwift)
ͪͳΈʹ 21 RealmࠓͰͬͯ·͢
RealmͱLRUΩϟογϡͷ͍͚ 22 • αʔόʔʹಧ͍͍ͯΔσʔλ: LRUσΟεΫΩϟογϡ • αʔόʔʹಧ͍͍ͯͳ͍σʔλ: Realm
αʔόʔʹಧ͍͍ͯͳ͍σʔλ 23 1. ૹ৴தͷϝοηʔδɾίϝϯτ 2. ೖྗதͷϑΥʔϜ
Ωϟογϡʹର͢ΔϙϦγʔ 24 దࡐదॴ
ࣗಈσϓϩΠ
ࣗಈσϓϩΠͷϞνϕʔγϣϯ 26 • Pull Request͕Ϛʔδ͞ΕͨΒ୭Ͱಈ࡞֬ೝͰ͖ΔΑ͏ʹ͍ͨ͠ • QA͕ྃͨ͠Β͙͢ʹ৹ࠪʹग़ͤΔΑ͏ʹ͍ͨ͠ • ୭͔ͷڥʹґଘͤͣʹσϓϩΠͰ͖ΔΑ͏ʹ͍ͨ͠
Travis CI 27
ࣗಈσϓϩΠͷϙϦγʔ 28 • git push͞ΕͨΒΞʔΧΠϒ + σϓϩΠ • Ϗϧυ൪߸Travis CI͕ৼΔ
• खݩͰͷΞʔΧΠϒجຊతʹ͠ͳ͍
ڥ 29 %FQMPZ(BUF %FWFMPQNFOU 5FTU'MJHIU 1SPEVDUJPO
Gitϒϥϯν͝ͱͷϏϧυλεΫ 30 • feature: ςετ • master: ςετ + Development
• release: ςετ + Development + Production
Ϗϧυ࣌ؒ 31
Ϗϧυ࣌ؒ 32
Ͳ͏ͳ͔ͬͨʁ 33 • ͙͢ಈ࡞Λ֬ೝͯ͠Β͑ΔΑ͏ʹͳͬͨ • Ϗϧυ͍ͯͩͬͯ͘͠͞ݴΘΕͳ͍ • ਃָ͕ʹͳͬͨ • ୭ͰਃͰ͖ΔΑ͏ʹͳͬͨ
34 ·ͱΊ
·ͱΊ 35 • ָʹ͘։ൃͰ͖ΔΑ͏ʹઃܭΛߟ͍͑ͯΔ • ϛε͕ى͜Γ͍͢ઃܭආ͚Δ • ୭ͰؾܰʹσϓϩΠͰ͖ΔΑ͏ʹ͓ͯ͘͠ • ·ͩ·ͩൃల్্...ʂ
None