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
pixivアプリでマルチモジュールを実現するまで
Search
gatosyocora
March 28, 2024
Programming
1
230
pixivアプリでマルチモジュールを実現するまで
gatosyocora
March 28, 2024
Tweet
Share
More Decks by gatosyocora
See All by gatosyocora
デザインシステムcharcoalとJetpack Compose
gatosyocora
1
160
Other Decks in Programming
See All in Programming
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
2
670
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
100
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
120
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
110
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
330
Contemporary Test Cases
maaretp
0
140
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
190
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
290
みんなでプロポーザルを書いてみた
yuriko1211
0
260
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
330
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
WebフロントエンドにおけるGraphQL(あるいはバックエンドのAPI)との向き合い方 / #241106_plk_frontend
izumin5210
4
1.4k
Featured
See All Featured
A Philosophy of Restraint
colly
203
16k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Typedesign – Prime Four
hannesfritz
40
2.4k
Making Projects Easy
brettharned
115
5.9k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
Thoughts on Productivity
jonyablonski
67
4.3k
The World Runs on Bad Software
bkeepers
PRO
65
11k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
Transcript
gatosyocora pixivΞϓϦͰϚϧνϞδϡʔϧΛ࣮ݱ͢Δ·Ͱ
ΞδΣϯμ 1. ϚϧνϞδϡʔϧͱ 2. pixivΞϓϦͷϚϧνϞδϡʔϧ 3. pixivΞϓϦνʔϜͰͷϚϧνϞδϡʔϧԽͷਐΊํ
ࣗݾհ • 2021৽ଔೖࣾ • AndroidΤϯδχΞ • pixiv AndroidΞϓϦ gatosyocora
ϚϧνϞδϡʔϧͱ
ϞδϡʔϧԽ • ίʔυϕʔεͷ݁ͼ͖ͭΛऑΊɺࣗݾ݁ܕͷ෦ͷฤʹ͢Δ͜ͱ https://developer.android.com/topic/modularization
ϞδϡʔϧԽͷར • ࠶ར༻ੑ • ݫີͳදࣔઃఆཧ • ΧελϚΠζՄೳͳ৴ • ֦ுੑ •
Φʔφʔγοϓ • Ϗϧυ࣌ؒ https://developer.android.com/topic/modularization
ϞδϡʔϧԽͷར ࠶ར༻ੑ : ಉ͡Ϟδϡʔϧ͔ΒෳͷΞϓϦΛ࡞Ͱ͖Δ • Ұ෦ػೳΛϓϩτλΠϓΞϓϦͱͯ͠ฒߦͯ͠։ൃͰ͖Δ ݫີͳදࣔઃఆཧ : ଞͷϞδϡʔϧʹެ։͢ΔൣғΛ੍ޚͰ͖Δ •
IDEͷิʹग़͖͢ީิΛߜΕɺ։ൃମݧ্͕͞ΕΔ Φʔφʔγοϓ : ίʔυͷอकɺมߋͷϨϏϡʔͳͲΛ୲͢ΔΦʔφʔΛࢦఆ • νʔϜ͝ͱʹͲͷϞδϡʔϧΛ৮Εྑ͍͔໌֬ʹͳΓɺ ਝͳ։ൃʹܨ͕Δ
pixivΞϓϦͷϚϧνϞδϡʔϧ
pixivΞϓϦ • ΠϥετɾϚϯΨɾখઆͷӾཡߘ͕Ͱ͖Δ • ৽ணɺݕࡧɺίϨΫγϣϯͳͲ༷ʑͳը໘ػೳ • MVVMΞʔΩςΫνϟ / ϨΠϠʔυΞʔΩςΫνϟ •
DIϥΠϒϥϦ Dagger HiltΛಋೖ
pixivΞϓϦͷϞδϡʔϧߏ
ެࣜਪͷΞϓϦΞʔΩςΫνϟ https://developer.android.com/topic/architecture#recommended-app-arch
pixivΞϓϦͷϞδϡʔϧߏ • appɿϧʔτͷϞδϡʔϧ • featureɿpresentationͷ࣮ • domainɿϏδωεϩδοΫσʔλϞσϧ • dataɿAPIΞΫηεDBॲཧͱDTO •
coreɿڞ௨࣮
ґଘੑͷٯస • நԽΛ۩ମతͳ࣮͔Βͤ͞Δ • HiltͰinterfaceܦ༝Ͱ༻Մೳʹ pixivΞϓϦͷϞδϡʔϧߏ @Binds @Singleton abstract fun
bindSampleRepository( sampleRepositoryImpl: SampleRepositoryImpl ): SampleRepository
pixivΞϓϦͷϞδϡʔϧͷ • Resource Pre fi xΛઃఆ • ϞδϡʔϧͷৄࡉΦʔφʔγοϓͷ໌֬Խ
Resource Pre fi xΛઃఆ • ϞδϡʔϧͷϦιʔεʹpre fi xΛཁٻ • Ϧιʔεͷஔॴ͕໌֬ʹͳΔ
• Ϧιʔε໊ͷিಥ͕ͳ͘ͳΔ pixivΞϓϦͷϞδϡʔϧͷ android { namespace ‘com.sample.app.feature.post’ resoursePre fi x ‘feature_post_’ } build.gradle
ϞδϡʔϧͷৄࡉΦʔφʔγοϓͷ໌֬Խ • ୭͕ཧ͢Δ͔Λهࡌ • ෳνʔϜͰΞϓϦ։ൃ͢Δମ੍ʹରԠ pixivΞϓϦͷϞδϡʔϧͷ # :feature:post ## ׂ
ߘը໘ͷUIΛఏڙ͢Δ ## ίʔυΦʔφʔ pixiv ΞϓϦνʔϜ ## มߋ࣌ͷҙ ಈ࡞͕มΘΔ߹A νʔϜʹڞ༗͢Δ͜ͱ README.md
pixivΞϓϦνʔϜͰͷ ϚϧνϞδϡʔϧԽͷਐΊํ
pixivΞϓϦͷϞδϡʔϧߏͷਪҠ
pixivΞϓϦͷϚϧνϞδϡʔϧԽͷਐΊํ 1. ϦϑΝϨϯε࣮Λ࡞ 2. υΩϡϝϯτԽ 3. νʔϜϝϯόʔͰ֤ࣗରԠ͍ͯ͘͠ • ϞδϡʔϧԽͷͨΊͷπʔϧ •
νʔϜඪʹڍ͛ͯਐΊΔ
pixivΞϓϦͷϞδϡʔϧԽΛνʔϜͰਐΊΔ ϞδϡʔϧԽͷͨΊͷπʔϧ • Ϟδϡʔϧ࡞πʔϧ • ϑΝΠϧͷ࡞ґଘΛՃ • settings.gradleʹՃ • resource
pre fi xͷઃఆ • string, drawableϦιʔεҠಈπʔϧ $ruby create_module.rb feature post
pixivΞϓϦͷϞδϡʔϧԽΛνʔϜͰਐΊΔ νʔϜඪʹڍ͛ͯਐΊΔ • ϞδϡʔϧԽ͢ΔϑΝΠϧͷ݅ͷඪΛཱͯΔ • ఆྫͰϞδϡʔϧԽͰ͖ͨ݅Λ֬ೝ͢Δ • ຖिϞδϡʔϧԽͷ࡞ۀΛ͢Δ࣌ؒΛઃ͚ͯਐΊΔ
·ͱΊ • ϚϧνϞδϡʔϧԽʹΑͬͯνʔϜ։ൃ͕ḿΔ • ϓϩτλΠϓΞϓϦ, IDEิީิ͔Βআ֎, ίʔυͷΦʔφʔγοϓ • pixivΞϓϦfeature, domain,
data, coreϞδϡʔϧͰߏ͞Ε͍ͯΔ • ඪઃఆ, ਐḿͷܭଌ, ิॿπʔϧͳͲͰνʔϜͰண࣮ʹਐΊͨ https://developer.android.com/topic/modularization https://developer.android.com/topic/modularization/patterns