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.7k
Nuxt.jsが掲げる"Universal Vue.js Applications"とは何者か
ishkawa
10
2.6k
Static Dependency Injection by Code Generation
ishkawa
15
6.1k
実践クライアントサイドSwift
ishkawa
24
4k
JSON-RPC on APIKit
ishkawa
5
51k
RxSwiftは開発をどう変えたか?
ishkawa
12
3.7k
Swift + JSON-RPC
ishkawa
0
48k
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
65
11k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
We Have a Design System, Now What?
morganepeng
50
7.2k
Code Review Best Practice
trishagee
64
17k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Typedesign – Prime Four
hannesfritz
40
2.4k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
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