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
2k
メルペイのエンジニアリング組織の変化と目指すチーム像
jarinosuke
5
5.7k
RIBs
jarinosuke
2
1.6k
メルカリiOSアプリ開発の現状とこれから / Mercari Day 2017
jarinosuke
3
6.5k
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
すぐに始めるAWSコスト削減。短期でできる改善策と長期的な運用負荷軽減への取り組み方を解説
ncdc
1
340
なぜクラウドサービスで Web コンソールを提供するのか
shuta13
4
1.8k
Oracle Exadata Database Service(Dedicated Infrastructure):サービス概要のご紹介
oracle4engineer
PRO
0
9.4k
Staff Engineer / 20240827 Yuichiro Masui
shift_evolve
0
150
標準ライブラリの奥深アップデートを掘り下げよう!
logica0419
2
410
contenteditableと向き合う
kikuchikakeru
2
160
Javaにおける関数型プログラミンへの取り組み
skrb
6
220
エンジニア視点で見る、 組織で運用されるデザインシステムにするには
shunya078
1
190
疎通2024
sadnessojisan
4
660
[RSJ24] Task Success Prediction for Open-Vocabulary Manipulation Based on Multi-Level Aligned Representations
keio_smilab
PRO
0
220
Hyperledger Fabricの成長、成熟を振り返る / Looking back history of Hyperledger Fabric
gakumura
0
180
Oracle Base Database Service:サービス概要のご紹介
oracle4engineer
PRO
0
13k
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
21
3k
Designing Experiences People Love
moore
138
23k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
165
48k
4 Signs Your Business is Dying
shpigford
179
21k
In The Pink: A Labor of Love
frogandcode
139
22k
The Invisible Customer
myddelton
119
13k
Six Lessons from altMBA
skipperchong
26
3.3k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Pencils Down: Stop Designing & Start Developing
hursman
118
11k
How GitHub (no longer) Works
holman
309
140k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
22
3.9k
The Power of CSS Pseudo Elements
geoffreycrofte
71
5.2k
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