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.6k
Introducing Wire: Dependency Injection by Code Generator
ishkawa
12
1.2k
Declarative UICollectionView
ishkawa
28
7.8k
Nuxt.jsが掲げる"Universal Vue.js Applications"とは何者か
ishkawa
10
2.7k
Static Dependency Injection by Code Generation
ishkawa
15
6.2k
実践クライアントサイドSwift
ishkawa
24
4.1k
JSON-RPC on APIKit
ishkawa
5
52k
RxSwiftは開発をどう変えたか?
ishkawa
12
3.7k
Swift + JSON-RPC
ishkawa
0
49k
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
41
7.2k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
960
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
3
180
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
870
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.5k
RailsConf 2023
tenderlove
29
970
What's in a price? How to price your products and services
michaelherold
244
12k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
500
Designing for Performance
lara
604
68k
Rails Girls Zürich Keynote
gr2m
94
13k
Designing on Purpose - Digital PM Summit 2013
jponch
116
7.1k
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