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
Cookpad TechConf 2019 〜霞が関〜 クックパッドiOSアプリの 破壊と創造...
Search
giginet
PRO
February 27, 2019
Technology
14
7k
Cookpad TechConf 2019 〜霞が関〜 クックパッドiOSアプリの 破壊と創造、そして未来
https://techconf.cookpad.com/2019/
giginet
PRO
February 27, 2019
Tweet
Share
More Decks by giginet
See All by giginet
Creating Intuitive Developer Tool in Swift
giginet
PRO
0
1.1k
Mergeable Libraryで 高速なアプリ起動を実現しよう!
giginet
PRO
2
4.4k
5分でわかるExplicitly Built Modules
giginet
PRO
0
640
Introduction for Open Source Swift Workshop
giginet
PRO
0
1.5k
Swift Packageを使った 巨大な依存グラフのキャッシュ戦略
giginet
PRO
5
5k
Deep Dive into Mergeable Library
giginet
PRO
1
1.8k
Go beyond the Actor Boundary ~ Swift 6へのConcurrency対応 ~
giginet
PRO
1
3.5k
新しいビルドツールScipioのご紹介
giginet
PRO
3
1.1k
ポケモンで学ぶiOS 16弾丸ツアー 🚅
giginet
PRO
1
940
Other Decks in Technology
See All in Technology
株式会社ログラス − エンジニア向け会社説明資料 / Loglass Comapany Deck for Engineer
loglass2019
3
32k
Fanstaの1年を大解剖! 一人SREはどこまでできるのか!?
syossan27
2
170
新機能VPCリソースエンドポイント機能検証から得られた考察
duelist2020jp
0
230
GitHub Copilot のテクニック集/GitHub Copilot Techniques
rayuron
37
15k
開発生産性向上! 育成を「改善」と捉えるエンジニア育成戦略
shoota
2
400
Oracle Cloudの生成AIサービスって実際どこまで使えるの? エンジニア目線で試してみた
minorun365
PRO
4
290
alecthomas/kong はいいぞ / kamakura.go#7
fujiwara3
1
300
スタートアップで取り組んでいるAzureとMicrosoft 365のセキュリティ対策/How to Improve Azure and Microsoft 365 Security at Startup
yuj1osm
0
230
kargoの魅力について伝える
magisystem0408
0
210
Snykで始めるセキュリティ担当者とSREと開発者が楽になる脆弱性対応 / Getting started with Snyk Vulnerability Response
yamaguchitk333
2
190
Opcodeを読んでいたら何故かphp-srcを読んでいた話
murashotaro
0
280
サービスでLLMを採用したばっかりに振り回され続けたこの一年のあれやこれや
segavvy
2
500
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
Rails Girls Zürich Keynote
gr2m
94
13k
Designing for Performance
lara
604
68k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Designing on Purpose - Digital PM Summit 2013
jponch
116
7k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
The World Runs on Bad Software
bkeepers
PRO
65
11k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Transcript
@giginet ϞόΠϧج൫෦ ʙբ͕ؔʙ ΫοΫύουiOSΞϓϦͷ ഁյͱɺͦͯ͠ະདྷ
2 ࠷ॳͷίϛοτ ݄ ݱࡏ·Ͱͷίϛοτ ϦϦʔεස िճ ϦϦʔεลΓͷ։ൃऀ d
૯ίʔυߦ ˞ݱࡏͷίʔυϕʔεʹҠߦޙ
3 ։ൃऀ͝ͱͷ1ͷྦྷੵϏϧυ࣌ؒ 1h 1.5h
4 27% 73% 155,000ߦ 58,700 ߦ Objective-C Swift
՝ 5 •1ྦྷੵ1࣌ؒ/ਓΛ্ճΔϏϧυ࣌ؒ •ࠓͳ͓25%͋ΔObjective-C •ϝϯς͞Εͯͳ͍ػೳ •ີ݁߹ա͗ͯͲ͔͜ม͑ΔͱյΕΔ
6 բ͕ؔ IUUQTKBXJLJQFEJBPSHXJLJ&##%&#$"&"%#&#"#&"
բ͕ؔͷత 7 •ίʔυཧ •Objective-Cͷഁյ •Ϗϧυ࣌ؒͷվળ
ཧ 8 .PEVMFT %ZOBNJD'SBNFXPSL "QQMJDBUJPO
ݱ࣮
ϚϧνϞδϡʔϧԽ 10 •Ωϟογϡ͕ޮ͖ɺ։ൃ࣌ͷϏϧυߴԽ •ݹ͍࣮ͷӅṭ •ը໘ؒΛૄ݁߹ʹͰ͖Δ
Objective-C Bridging 11 11 MyApp-Bridging-Header.h MyApp-Swift.h
բ͕ؔͷΰʔϧ 12 •։ൃऀͷखݩͷϏϧυ࣌ؒΛ130ҎʹೲΊΔ •Objective-CΛશʹফ͠ڈΔ
։ൃऀͷੜ࢈ੑΛ ͳΜͱ͔͢Δͷ͕ բ͕ؔ
View Model ViewController
15 View Model ViewController ϩδοΫΛ࣋ͭ7JFX XXXManager γϯάϧτϯͷσʔλιʔε .BTTJWF7JFX$POUSPMMFS ڞ௨Խ͞ΕͯංେԽͨ͠Ϟσϧ ☠
σουίʔυ ີ݁߹ 7JFXͷܧঝɺ͍ճ͠ ৮ͬͯ ͍͚ͳ͍ͭ ࠞಱ
DataStore UseCase Presenter ViewBuilder View Wireframe Entity DataStore Entity UseCase
Interactor Presentation Layer Domain Layer Data Layer Repository $PPLQBE7*1&3
17 Tsukuru Cookpad 7*1&3ԽҎલͷ.7$ 0CKFDUJWF$ 4XJGUͷࠞࡏ 7*1&3Խޙͷը໘ͷू߹ 4XJGU ɾɾɾ ࠞಱ
Cookpad
18 Tsukuru Cookpad 7*1&3ԽҎલͷ.7$ 0CKFDUJWF$ 4XJGUͷࠞࡏ 7*1&3Խޙͷը໘ͷू߹ 4XJGU ɾɾɾ 7*1&3ΞϓϦέʔγϣϯ
Cookpad
طଘͷΞʔΩςΫνϟΛ ੜ͔ͨ͠ ϚϧνϞδϡʔϧԽ
20
21 YAML yonaskolb/XcodeGen ࣗಈੜ
22 ৽نλʔήοτ
23 targets: CookpadCore: type: framework platform: iOS sources: - CookpadCore
settings: base: PRODUCT_BUNDLE_IDENTIFIER: com.cookpad.CookpadCore scheme: testTargets: - CookpadCoreTests dependencies: - sdk: Foundation.framework - carthage: Result - carthage: RxCocoa - carthage: RxSwift
24 σΟϨΫτϦߏʹΑΓ ॴଐ͢ΔϏϧυλʔήοτ͕ อূ͞ΕΔ
xcodeprojΛഁյͨ͠Β Ϟδϡʔϧಋೖ͕༰қʹ
ϚϧνϞδϡʔϧͷ ಋೖ 26
բ͕ؔͷίϯηϓτ 27 •େ͖ͳॻ͖͑Λڧ੍͠ͳ͍ •Objective-CΛ࣋ͪࠐ·ͤͳ͍ •࣮ৄࡉVIPERΞϓϦέʔγϣϯʹӅṭ
բ͕ؔͷίϯηϓτ 28 •େ͖ͳॻ͖͑Λڧ੍͠ͳ͍ •Objective-CΛ࣋ͪࠐ·ͤͳ͍ •࣮ৄࡉVIPERΞϓϦέʔγϣϯʹӅṭ
բ͕ؔͷίϯηϓτ 29 •େ͖ͳॻ͖͑Λڧ੍͠ͳ͍ •Objective-CΛ࣋ͪࠐ·ͤͳ͍ •࣮ৄࡉVIPERΞϓϦέʔγϣϯʹӅṭ
30 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C
31 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C
32 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C
33 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C
34 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C
35 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C ந
36 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C Environment ۩ମతͳ࣮ ΠϯλʔϑΣΠεͷΈΛఏڙ
37 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C Environment բ͕ؔήʔτΣΠ
38 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C Bridging HeaderΛ ࣋ͨͳ͍
39 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C Objective-C Bridge ΞϓϦͰ͚ͩ࣋ͭ
Objective-CΛ Έతʹഉআ SwiftԽͷ༏ઌॱҐΛՄࢹԽ
41 Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature B Feature
C Ӆṭ͍ͨ͠
42 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C Environment ΠϯλʔϑΣΠεͷΈΛఏڙ
43 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C Environment ݹ͍ϥΠϒϥϦͷґଘ ΞϓϦͷΈ͕࣋ͭ ۩ମతͳ࣮
44 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C Environment ݹ͍ϥΠϒϥϦͷґଘ ΞϓϦͷΈ͕࣋ͭ ۩ମతͳ࣮ ػೳͷ։ൃ࣌ʹݹ͍ϥΠϒϥϦΛ ҙࣝ͠ͳͯ͘ࡁΉΑ͏ʹ
45 APIClient.share Cookpad Tests 45 Method Swizzling API Stub
46 Environment CookpadEnvironment TestingEnvironment Cookpad Tests Network Logger ը໘ભҠ
47 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C Ҡߦத Ҡߦத
՝ 48 Bundle Dynamic Linking Time Tsukuruશഁյ Feature moduleҠߦ Ϟδϡʔϧؒͷґଘ
దͳϞδϡʔϧׂ୯Ґ ։ൃ৫ͷεέʔϧ Objective-Cશഁյ
͝ਗ਼ௌ ͋Γ͕ͱ͏͍͟͝·ͨ͠ !HJHJOFU