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
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
260
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
540
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
詳細解説! ArrayListの仕組みと実装
yujisoftware
0
580
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
890
Flutterを言い訳にしない!アプリの使い心地改善テクニック5選🔥
kno3a87
1
170
Jakarta EE meets AI
ivargrimstad
0
140
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
RubyLSPのマルチバイト文字対応
notfounds
0
120
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
2
1.1k
シェーダーで魅せるMapLibreの動的ラスタータイル
satoshi7190
1
480
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
43
13k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
A Modern Web Designer's Workflow
chriscoyier
693
190k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Ruby is Unlike a Banana
tanoku
97
11k
Into the Great Unknown - MozCon
thekraken
32
1.5k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
860
YesSQL, Process and Tooling at Scale
rocio
169
14k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
Making Projects Easy
brettharned
115
5.9k
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