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.3k
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
6k
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
いま現場PMのあなたが、 経営と向き合うPMになるために 必要なこと、腹をくくること
hiro93n
9
7.4k
2025年の挑戦 コーポレートエンジニアの技術広報/techpr5
nishiuma
0
140
AWSマルチアカウント統制環境のすゝめ / 20250115 Mitsutoshi Matsuo
shift_evolve
0
110
Bring Your Own Container: When Containers Turn the Key to EDR Bypass/byoc-avtokyo2024
tkmru
0
840
PaaSの歴史と、 アプリケーションプラットフォームのこれから
jacopen
7
1.4k
エンジニアリングマネージャー視点での、自律的なスケーリングを実現するFASTという選択肢 / RSGT2025
yoshikiiida
4
3.6k
今から、 今だからこそ始める Terraform で Azure 管理 / Managing Azure with Terraform: The Perfect Time to Start
nnstt1
0
210
Kotlin Multiplatformのポテンシャル
recruitengineers
PRO
2
150
Cloudflareで実現する AIエージェント ワークフロー基盤
kmd09
0
280
テストを書かないためのテスト/ Tests for not writing tests
sinsoku
1
170
深層学習と3Dキャプチャ・3Dモデル生成(土木学会応用力学委員会 応用数理・AIセミナー)
pfn
PRO
0
460
デジタルアイデンティティ技術 認可・ID連携・認証 応用 / 20250114-OIDF-J-EduWG-TechSWG
oidfj
2
630
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
328
38k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.3k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.3k
The Language of Interfaces
destraynor
155
24k
The World Runs on Bad Software
bkeepers
PRO
66
11k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.1k
Testing 201, or: Great Expectations
jmmastey
41
7.2k
How GitHub (no longer) Works
holman
312
140k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.5k
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