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
US 版 Mercari をまるごと1から作り直した話
Search
Naoki ISHIKAWA
September 17, 2017
Technology
2
4.2k
US 版 Mercari をまるごと1から作り直した話
iOSDC 2017 in Tokyo, September 16-17, 2017
https://iosdc.jp/2017/node/1438
Naoki ISHIKAWA
September 17, 2017
Tweet
Share
More Decks by Naoki ISHIKAWA
See All by Naoki ISHIKAWA
パラレルの通話を支える iOS アプリ上での技術
jarinosuke
0
2.1k
メルペイのエンジニアリング組織の変化と目指すチーム像
jarinosuke
5
5.9k
RIBs
jarinosuke
2
1.7k
メルカリiOSアプリ開発の現状とこれから / Mercari Day 2017
jarinosuke
3
6.6k
Drink Meetup with Mercari #36
jarinosuke
0
1.1k
Switching Icon.png depending on each environment
jarinosuke
2
11k
Other Decks in Technology
See All in Technology
事業貢献を考えるための技術改善の目標設計と改善実績 / Targeted design of technical improvements to consider business contribution and improvement performance
oomatomo
0
100
WACATE2024冬セッション資料(ユーザビリティ)
scarletplover
0
210
宇宙ベンチャーにおける最近の情シス取り組みについて
axelmizu
0
110
20241220_S3 tablesの使い方を検証してみた
handy
4
630
Wantedly での Datadog 活用事例
bgpat
1
530
生成AIのガバナンスの全体像と現実解
fnifni
1
190
NilAway による静的解析で「10 億ドル」を節約する #kyotogo / Kyoto Go 56th
ytaka23
3
380
PHPからGoへのマイグレーション for DMMアフィリエイト
yabakokobayashi
1
170
組織に自動テストを書く文化を根付かせる戦略(2024冬版) / Building Automated Test Culture 2024 Winter Edition
twada
PRO
17
4.8k
2024年にチャレンジしたことを振り返るぞ
mitchan
0
140
20241214_WACATE2024冬_テスト設計技法をチョット俯瞰してみよう
kzsuzuki
3
590
AI時代のデータセンターネットワーク
lycorptech_jp
PRO
1
290
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
44
13k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
The Invisible Side of Design
smashingmag
298
50k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.4k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Optimizing for Happiness
mojombo
376
70k
Building Applications with DynamoDB
mza
91
6.1k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
Building Better People: How to give real-time feedback that sticks.
wjessup
365
19k
Optimising Largest Contentful Paint
csswizardry
33
3k
Transcript
US ൛ Mercari Λ·Δ͝ͱ 1͔Β࡞Γͨ͠ iOSDC Japan 2017 Naoki Ishikawa
@jarinosuke
ࣗݾհ • ੴथ (@jarinosuke) • Mercari, Inc (joined at 2016/05)
•iOS Engineer
աڈͷεϥΠυ • Drink Meetup with Mercari iOS(20166݄) • https://speakerdeck.com/jarinosuke/drink-meetup-with- mercari-number-36
• Mercari Day 2017(20171݄) • https://speakerdeck.com/jarinosuke/mercari-day-2017
Agenda 1. ࡞Γͨ͠എܠɺ͘͠ੵΈॏͶΒΕͨྺ࢙ 2. Ͳ͏ͬͯ࡞Γͨ͠ͷ͔ʢώτɺ࣌ؒɺํ๏ʣ 3. ࡞Γͯ͠ղܾͨ͠ίτ
1.࡞Γͨ͠എܠɺ ͘͠ੵΈॏͶΒΕͨྺ࢙
mercari-ios ͷྺ࢙ ! " 2016/11 master
mercari-ios ͷྺ࢙ ! " 2016/11ࠒ master jp/master
ιʔείʔυׂ • ϚϧνιʔεϚϧνόΠφϦ • ୯Ұ repos Ͱ branch ͰϦʔδϣϯຖʹׂ
mercari-ios ͷྺ࢙ ! " 2016/11ࠒ master jp/master 2017/4த० 3,4ϲ݄
ιʔείʔυׂͨ͠ޙͷ3,4ϲ݄ • ϋϯόʔΨʔϝχϡʔ->λϒԽ • ϖʔδͷϦχϡʔΞϧ • ϓϥΠϕʔτνϟοτػೳ • ͳͲͳͲ… •
͍αΠΫϧͰͨ͘͞Μͷ৽ػೳΛϦϦʔεͰ͖ͨ
ґવͱͯ͠Δ՝ • ϦʔδϣϯذɺABςετͷංେԽ • Objective-Cͱܕ • ΞʔΩςΫνϟ(MVC, MVVM)͕ࠞࡏ मਖ਼ʹରͯ͠ͷίετ͕ͱͯߴ͘ͳ͖͍ͬͯͯͨ
ϦʔδϣϯذɺABςετͷංେԽ • if (isUS) {} else {} • if (AB_improve_xxx)
{} else {} • if (isUS) { if (AB) {} else {} } else { if (AB) {} else {} } * ͋͘·ͰྫͰ͢ ࣮ίετ↗ QAίετ↗
Objective-Cͱܕ • class A { init(with string: String) } •
NSDictionary *data; • [[A alloc] initWithString:data[@“id”]]; • ಈతܕ͚ͱ੩తܕ͚͕ࠞࡏ͠ɺ༧ظͤ͵Ϋϥογϡ
ΞʔΩςΫνϟ(MVC, MVVM)͕ࠞࡏ • ϝϧΧϦ iOS 2013ʹϦϦʔε(iOS7͕ϦϦʔε͞Εͨࠒ) • ग़ը໘VC Created by
Shinichiro Oba on 2013/04/20 • ObjC/Swift, MVC/MVVM ͷڞଘʢࠞࡏʣ
mercari-ios ͷྺ࢙ ! " 2016/11ࠒ master jp/master 2017/4த०
mercari-ios ͷྺ࢙ ! " 2016/11ࠒ master jp/master 2017/4த०
⇧ + ⌘ + N
⇧ + ⌘ + N Create New Project
2.Ͳ͏ͬͯ࡞Γ͔ͨ͠ ʢώτɺ࣌ؒɺํ๏ʣ
νʔϜߏ • kitasuke • chuganzy • yoichi • jarinosuke
νʔϜߏ • kitasuke Introducing protobuf in Swift • chuganzy ϝϧΧϦͰ࣮ࢪͨ͠աڈ࠷େنͷABςετʮυϩϫʔ
vs Լλϒʯͷཪ • yoichi ϞόΠϧΞϓϦͰࠔΒͳ͍ΤϥʔϋϯυϦϯάͱϩΪϯάͷ ϕετϓϥΫςΟε • jarinosuke US ൛ Mercari Λ·Δ͝ͱ1͔Β࡞Γͨ͠
࣮ػೳ • Tab, Home, Login/Signup, Network, Overall architecture • Checkout,
Search, WebView • DI, Item Detail, ReactNative • Listing, Local DB, Migration from current app ΊͪΌͪ͘Ό͋Δ
࡞ۀ୲ • Tab, Home, Login/Signup, Network, Overall architecture • Checkout,
Search, WebView • DI, Item Detail, ReactNative • Listing, Local DB, Migration from current app
։ൃεέδϡʔϧ • 4݄த०։ൃ։࢝ • 6݄ϦϦʔεඪ • ࣮࣭2ϲ݄
None
࡞ۀλΠϜϥΠϯ 4݄ 5݄ 6݄ Checkout WebView Search Tab, Home, Login/Signup,
Network, Overall architecture DI, Item Detail ReactNative LocalDB Listing Migration
༏ઌͨ͠ίτ • ͓٬༷͕ϦχϡʔΞϧΛҙࣝͤͣ͏͜ͱ͕Ͱ͖Δ • ΞʔΩςΫνϟΛ౷Ұ͢ΔɺςελϒϧͳߏΛҡ࣋͢Δ • ϦϦʔε͓ͯ͠٬༷ʹ৽͍͠ΞϓϦΛಧ͚Δ
༏ઌ͠ͳ͔ͬͨίτ • ॆͳςετίʔυ • iPad ରԠ • طଘΞϓϦͷ༷ʢθϩ͔Βߟ͑Δʣ
before after
3.࡞Γͯ͠ղܾͨ͠ίτ
طଘʹ༷͋ͬͨʑͳϢʔεέʔεΛআ • Ϧʔδϣϯ("/!)ʹΑΔίʔυذ • 20ݸऑͷABςετʹΑΔίʔυذ • ΞϓϦέʔγϣϯϩδοΫͷΈʹूதͰ͖ΔΑ͏ʹͳͬͨ
Swift/protobufͰܕ҆શ before after Objective-C Free
Swift/protobufͰܕ҆શ • protocol buffer • API Request/Response Ͱѻ͏ Model ͱͦͷϓϩύςΟͷܕ͕
อূ͞Εͨ • ৄ͘͠ kitasuke ͞Μͷ͜ͷهࣄ • kitasuke Introducing protobuf in Swift
BitriseʹҠߦ͠ϝϯςφϯείετݮ • ࠓ·Ͱࣗલͷ Jenkins on Mac • සൟʹωοτϫʔΫʹΞΫηεͰ͖ͣʹམͪΔ • ֎෦IP͔ΒΞΫηεͰ͖ͳ͍
• Xcode ͷόʔδϣϯΞοϓ
Swinject ʹΑΔ DI Ͱ Testable ͳߏʹ • ΞϓϦશମͷΞʔΩςΫνϟ DI Λҙࣝͨ͜͠ͱʹΑΓ౷Ұ͞
Εͨ • Author ͷ yoichi ͞ΜࣗΒಋೖͯ͘͠Εͨ • ViewModel ʹରͯ͠ Service Λ Injectable ͳߏʹͨ͠
Swinject ʹΑΔ DI Ͱ Testable ͳߏʹ ViewModel struct ViewModel {
let service: Service typealias Dependency = Service init(dependency: Dependency) { service = dependency } } ֎෦ʹґଘ͍ͯ͠Δ Service protocol ʹΓग़͠ɺMock Ͱ͖ΔΑ͏ʹઃܭ
Swinject ʹΑΔ DI Ͱ Testable ͳߏʹ Mercari Tech Conf 2017
US൛Mercari iOSΞϓϦͷΞʔΩςΫνϟͱDependency Injection
͓ΘΓʹ
ืू https://open.talentio.com/ 1/c/mercari/requisitions/ detail/4256