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
Yahoo! JAPANアプリとLayered Architecture
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Takuya Shigemoto
March 12, 2018
Technology
2.2k
2
Share
Yahoo! JAPANアプリとLayered Architecture
2018.03.12(Mon)にBonfire Android #3で発表した資料です。
Takuya Shigemoto
March 12, 2018
More Decks by Takuya Shigemoto
See All by Takuya Shigemoto
Google I/O Extended Tokyo 2018レポート
shgmn
1
770
Other Decks in Technology
See All in Technology
情シスがMCP環境導入時に打ちのめされる認可の崖
oidfj
0
460
Amazon CloudFrontにおけるAIボットアクセス制御のポイント
kizawa2020
4
280
AI とサービス・デザイン / AI and Service Design
ks91
PRO
0
170
Python開発環境にハーネス適用を検討する
yuuka51
1
520
A Harness for Behaviour: how to get AI to generate code that does what we intend, or "TDD in the age of AI"
xpmatteo
0
440
layerx-fde-practices
cipepser
6
2.7k
論文紹介:Pixal3D (SIGGRAPH 2026)
tenten0727
0
740
ルール・ロール・ツールを創る / Creating Rules, Roles and Tools
ks91
PRO
0
170
OpenID Connectによるサービス間連携
takesection
0
100
【禁断】Obsidianの第二の脳に「知の巨人」と呼ばれた師匠の脳をロードしてみた
nagatsu
0
6.7k
自称宇宙最速で不合格となったAIP-C01にリベンジを果たすべくAIで問題集アプリを作ってみた。
yama3133
0
200
Splunk MCPサーバの利活用事例 ーKINTOテクノロジーズの取り組み
kintotechdev
1
320
Featured
See All Featured
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
250
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
300
Done Done
chrislema
186
16k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
380
A Soul's Torment
seathinner
6
2.8k
Transcript
Yahoo! JAPANΞϓϦͱ Layered Architecture Ϡϑʔגࣜձࣾ ॏݩ
About me • ॏݩ ʢtwitter: @shgmn9ʣ • Android / iOS
• Ϡϑʔגࣜձࣾʢ2017.07ʙʣ • Android൛ Yahoo! JAPANΞϓϦ • Χϝϥͱੜ͖͕͖ • ञ
ΞδΣϯμ • Yahoo! JAPANΞϓϦ๊͕͍͑ͯͨ • Layered Architectureಋೖ • Layered ArchitectureಋೖͷՌ
• ઃܭΛҡ࣋͢ΔऔΓΈ • ͜Ε͔Β • ·ͱΊ
Yahoo! JAPANΞϓϦ͕ ๊͍͑ͯͨ ࣸਅɿΞϑϩ
ࣸਅɿΞϑϩ • େਓͷ։ൃͰɺෳҊ͕݅ฒߦͯ͠Δ • ໌֬ͳઃܭํ͕ແ͍ • Ϣχοτςετ͕ॻ͖ͮΒ͍
ઃܭͷબ ࣸਅɿΞϑϩ
Model View Whateverʁ ࣸਅɿΞϑϩ • Model View Whatever • MVP…ModelͱViewͱPresenter
• MVVM…ModelͱViewͱViewModel • Presentation Domain SeparationʢPDSʣ • Presentation…ೖྗΛड͚औΔɺݟͨΛ࡞Δ • Domain…ͦΕҎ֎
Presentationʹ͍ͭͯ ࣸਅɿΞϑϩ • Presentationͷ࣮ݱ • MVP…ViewͱPresenter • MVVM…ViewͱViewModel
Domainʹ͍ͭͯ ࣸਅɿΞϑϩ • Domainʁ • MVPMVVMͷMʢModelʣͷ͜ͱ • Domainͷઃܭʹ͍ͭͯMVWͰ৮Ε͍ͯͳ͍
Layered Architectureಋೖ ࣸਅɿΞϑϩ
goo.gl/GTAfLv
Application Presentation Domain Infrastructure ViewͱWhatever Model
Application Presentation Domain Infrastructure Ϣʔβೖྗɺදࣔ Presentation͕ୟ͘૭ޱ υϝΠϯΞΫηε͠ϢʔεέʔεΛ࣮ݱ ϏδωεϩδοΫ ֎෦ͷΞΫηεʢωοτϫʔΫɾDBɾetc…ʣ
ಋೖํ๏ • ϨΠϠʔׂΛ࣮ࡍʹίʔυʹద༻͢ΔͨΊʹ • ઃܭنҧΛػցతʹ͘Έ͕ඞཁ • ֤ϨΠϠʔผϞδϡʔϧʹׂ ࣸਅɿΞϑϩ
Application Presentation Domain Infrastructure compile project(‘:Application’) compile project(‘:Domain’) compile project(‘:Infrastructure’)
Application Presentation Domain Infrastructure Observable Observable Observable
αʔϏεͷάϩʔε • ػೳՃࢭ·Βͳ͍ • ಉҰػೳͷϦϑΝΫλϦϯάͱػೳՃ͕ಉ࣌ʹΒͳ ͍Α͏ʹεέδϡʔϧΛҾ͍ͨ ࣸਅɿΞϑϩ
࣭ • େنͳϦϑΝΫλϦϯάͷલޙͰͷ࣭୲อ • ApplicationϨΠϠʔҎԼϢχοτςετʢC0ʣΛٛ ͚ͨ • Coverage 80%Ҏ্ ࣸਅɿΞϑϩ
ఘΊͨ͜ͱ • DIಋೖ • Dagger2ֶशίετΛߟ͑ͯಋೖΛఘΊͨ ࣸਅɿΞϑϩ
Layered Architecture ಋೖͷՌ ࣸਅɿΞϑϩ
ಘͨͷ • ίʔυ͕͖Ε͍ʹͳͬͨ • ػೳՃͷࡍʹΉ͜ͱ͕ݮͬͨ • ϝϯόͷٕज़Ϩϕϧ͕ͨ͠ • ৽نʹδϣΠϯ͘͢͠ͳͬͨ ࣸਅɿΞϑϩ
Layered ArchitectureΛ ҡ࣋͢ΔऔΓΈ ࣸਅɿΞϑϩ
• ίϛολʔ੍ • ༷ڞ༗ձ • ઃܭϨϏϡʔձ ࣸਅɿΞϑϩ
ίϛολʔ੍ • ֓ཁ • ઃܭɾ࣮ํΛཧղͨ͠ϝϯόʔʢίϛολʔʣʹϓϧϦΫΤε τͷϨϏϡʔͷΛෛͬͯΒ͏ • ϓϧϦΫΤετͷϚʔδʹɺ࠷1ਓͷίϛολʔͷঝೝ͕ඞཁ • త
• େنϦϑΝΫλϦϯάޙͷίʔυΛܧଓతʹ͖Ε͍ͳঢ়ଶʹอͭ • ݱࡏʢ2018.03ʣ • ։ൃϝϯό21ਓʹର͠ίϛολʔ5ਓ ࣸਅɿΞϑϩ
༷ڞ༗ձ • ֓ཁ • Ҋ༷݅Λ؆୯ʹυΩϡϝϯτʹ·ͱΊɺΤϯδχΞ ؒͰڞ༗͢Δձ • త • ଐਓԽΛղফ͢Δ
• ༷ͷٕज़తͳݒ೦Λઃܭલʹચ͍ग़͢ • ଞҊ݅ͱͷฒߦ։ൃͷ࣮ݱՄೳੑΛݕ౼͢Δ ࣸਅɿΞϑϩ
ࣸਅɿΞϑϩ ઃܭϨϏϡʔձ • ֓ཁ • ༷ڞ༗ձͰγΣΞ༷ͨ͠ʹؔ͢ΔઃܭΛυΩϡϝ ϯτʹ·ͱΊɺΤϯδχΞؒ • త •
ઃܭํΛἧ͑ɺΞϓϦͷઃܭɾ࣭Λҡ࣋͢Δ
͜Ε͔Β ࣸਅɿΞϑϩ
͍͖͍ͬͯͨऔΓΈ • UIͷςετ • DI • AACʢLifecycleɺViewModelɺLiveDataʣ • ϏϧυͷߴԽ •
ػೳ͝ͱͷϚϧνϞδϡʔϧԽ ࣸਅɿΞϑϩ
·ͱΊ
·ͱΊ • ղܾ͍ͨ͠Λ͖ͪΜͱݟఆΊͯಋೖ͢ΔઃܭΛܾΊ Δ͜ͱ • ઃܭͷಋೖʹ͋ͨͬͯɺແཧ͠ͳ͍͜ͱ • ϏδωεଆͷཧղΛ͖ͪΜͱಘΔ͜ͱ • ઃܭΛҡ࣋͢ΔͨΊͷࢪࡦΛ͖ͪΜͱߦ͏͜ͱ
Yahoo! JAPANͰ ༷ʑͳྖҬͰΤϯδχΞΛืू͍ͯ͠·͢ʂ https://about.yahoo.co.jp/hr/ ࣸਅɿΞϑϩ
Thank you!