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.6k
メルカリ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
IBC 2024 動画技術関連レポート / IBC 2024 Report
cyberagentdevelopers
PRO
0
110
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
170
iOSチームとAndroidチームでブランチ運用が違ったので整理してます
sansantech
PRO
0
130
元旅行会社の情シス部員が教えるおすすめなre:Inventへの行き方 / What is the most efficient way to re:Invent
naospon
2
330
TypeScript、上達の瞬間
sadnessojisan
46
13k
障害対応指揮の意思決定と情報共有における価値観 / Waroom Meetup #2
arthur1
5
470
EventHub Startup CTO of the year 2024 ピッチ資料
eventhub
0
110
個人でもIAM Identity Centerを使おう!(アクセス管理編)
ryder472
3
180
Platform Engineering for Software Developers and Architects
syntasso
1
510
いざ、BSC討伐の旅
nikinusu
2
780
安心してください、日本語使えますよ―Ubuntu日本語Remix提供休止に寄せて― 2024-11-17
nobutomurata
0
980
OCI Network Firewall 概要
oracle4engineer
PRO
0
4.1k
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
52
13k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
410
BBQ
matthewcrist
85
9.3k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
Git: the NoSQL Database
bkeepers
PRO
427
64k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Done Done
chrislema
181
16k
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