Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
PaaSとSaaSの境目で信頼性と開発速度を両立する 〜TROCCO®︎のこれまでとこれから〜
gtnao
5
5.6k
5分ぐらいで分かる、トリミング機能の作り方
tsutsuitakumi
0
110
React CompilerとFine Grained Reactivityと宣言的UIのこれから / The next chapter of declarative UI
ssssota
7
2.7k
[FlutterKaigi2024] Effective Form 〜Flutterによる複雑なフォーム開発の実践〜
chocoyama
0
3.9k
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
2.9k
Leveling Up Developer Tooling for the Modern Rails & Hotwire Era @ Ruby Türkiye, November 2024
marcoroth
0
150
Contemporary Test Cases
maaretp
0
150
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
9
4k
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
7
3.1k
CSC509 Lecture 13
javiergs
PRO
0
120
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
3
820
Missing parts when designing and implementing Android UI
ericksli
0
360
Featured
See All Featured
Designing Experiences People Love
moore
138
23k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
Documentation Writing (for coders)
carmenintech
65
4.5k
Being A Developer After 40
akosma
87
590k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
How GitHub (no longer) Works
holman
310
140k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
400
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
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