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
アプリを起動せずにアプリを開発して品質と生産性を上げる
ishkawa
0
330
Achieving Testability in Presentation Layer
ishkawa
4
3.7k
Introducing Wire: Dependency Injection by Code Generator
ishkawa
12
1.2k
Declarative UICollectionView
ishkawa
28
7.9k
Nuxt.jsが掲げる"Universal Vue.js Applications"とは何者か
ishkawa
10
2.7k
Static Dependency Injection by Code Generation
ishkawa
15
6.3k
実践クライアントサイドSwift
ishkawa
24
4.2k
JSON-RPC on APIKit
ishkawa
5
54k
RxSwiftは開発をどう変えたか?
ishkawa
12
3.8k
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
223
9.5k
RailsConf 2023
tenderlove
29
1k
How to train your dragon (web standard)
notwaldorf
91
5.9k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
28
2k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
28
1.6k
Embracing the Ebb and Flow
colly
85
4.6k
Git: the NoSQL Database
bkeepers
PRO
429
65k
Why Our Code Smells
bkeepers
PRO
336
57k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Into the Great Unknown - MozCon
thekraken
36
1.7k
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