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
バクラクのドキュメント解析技術と実データにおける課題 / layerx-ccc-winter-2024
shimacos
2
1k
サービスでLLMを採用したばっかりに振り回され続けたこの一年のあれやこれや
segavvy
2
390
MLOps の現場から
asei
6
630
ハイテク休憩
sat
PRO
2
140
Snowflake女子会#3 Snowpipeの良さを5分で語るよ
lana2548
0
220
マイクロサービスにおける容易なトランザクション管理に向けて
scalar
0
110
Wantedly での Datadog 活用事例
bgpat
1
430
祝!Iceberg祭開幕!re:Invent 2024データレイク関連アップデート10分総ざらい
kniino
2
250
非機能品質を作り込むための実践アーキテクチャ
knih
3
900
KnowledgeBaseDocuments APIでベクトルインデックス管理を自動化する
iidaxs
1
260
How to be an AWS Community Builder | 君もAWS Community Builderになろう!〜2024 冬 CB募集直前対策編?!〜
coosuke
PRO
2
2.8k
Snykで始めるセキュリティ担当者とSREと開発者が楽になる脆弱性対応 / Getting started with Snyk Vulnerability Response
yamaguchitk333
2
180
Featured
See All Featured
Gamification - CAS2011
davidbonilla
80
5.1k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Adopting Sorbet at Scale
ufuk
73
9.1k
A Tale of Four Properties
chriscoyier
157
23k
Visualization
eitanlees
146
15k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Writing Fast Ruby
sferik
628
61k
Become a Pro
speakerdeck
PRO
26
5k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
The Language of Interfaces
destraynor
154
24k
Statistics for Hackers
jakevdp
796
220k
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