Share
Embed
DroidKaigiカンファレンスアプリの歴史からみるアプリアーキテクチャのこれまでとこれから
DroidKaigi2021 Day2 発表資料です。
DroidKaigi2015から2021までのカンファレンスアプリを主にアーキテクチャの点から比較し、どのような技術に置き換わっていったのか・未来のアプリ開発のデファクトスタンダードはどうなるのかを知ることができます。
https://droidkaigi.jp/2021/timetable/?day=2
Kazuki Chigita
October 20, 2021
Transcript
79 slides
-
%SPJE,BJHJΧϯϑΝϨϯεΞϓϦͷ ྺ࢙͔ΒΈΔ ΞϓϦΞʔΩςΫνϟͷ ͜Ε·Ͱͱ͜Ε͔Β ,B[VLJ$IJHJUB DIJHJDIBO "The Android robot is
reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License." DroidKaigi2021 -
Speaker ,B[VLJ$IJHJUB chigichan24 "OESPJEBQQMJDBUJPOEFWFMPQFS *OUFSFTUFE "QQMJDBUJPO"SDIJUFDUVSF 4ZTUFN%FTJHO %JTUSJCVUFE4ZTUFN 1BTU UBMLPO%SPJE,BJHJ
ܧଓతʹػೳ։ൃΛਐΊͳ͕Βߦ͏ϚϧνϞδϡʔϧԽ %SPJE,BJHJ ”Twemoji” ©Twitter, Inc and other contributors (Licensed under CC-BY 4.0) https://twemoji.twitter.com/ -
Break the Ice 2%SPJE,BJHJΧϯϑΝϨϯεΞϓϦ͕͋Δͷͬͯ·͔ͨ͠ʁ ͦΜͳͷ͕͋ͬͨͷ͔ʂ ࠓ͡ΊͯΓ·ͨ͠ ͪΖΜͬͯΔΑ Πϯετʔϧͯ͠ΔΑ ίϯτϦϏϡʔτͯ͠ΔΑ ࢲ͕99ը໘ͷ࡞ऀͰ͢
৴αΠτ5XJUUFSͰίϝϯτͯ͠Ͷʙ ”Twemoji” ©Twitter, Inc and other contributors (Licensed under CC-BY 4.0) https://twemoji.twitter.com/ -
എܠͱൃදͰ ࢦ͢ΰʔϧ ֤ͷ ηογϣϯ ใऔಘը໘ ࣮ ͷ %,BJHJΞϓϦ ͔Βඥղ͘ ະདྷͷ
σϑΝΫτ Section 1 Section 2 Section 3 Agenda -
എܠͱൃදͰ ࢦ͢ΰʔϧ ֤ͷ ηογϣϯ ใऔಘը໘ ࣮ ͷ %,BJHJΞϓϦ ͔Βඥղ͘ ະདྷͷ
σϑΝΫτ Section 1 Section 2 Section 3 Agenda -
(Section1) Background and purpose of this presentation ͜ͷηΫγϣϯͷత ϓϨθϯશମͷഎܠɾతɾ
ΰʔϧΛڞ༗͢Δɻ ͜ΜͳʹมԽ͍ͯ͠Δͷ͔ʂͷ ڻ͖Λڞ༗͢Δɻ -
2016 2021 In Google I/O 2017, the Android team announced
first-class support for Kotlin. Main Language JAVA Kotlin Supported Platform Android Android iOS web Main Libraries Jetpack Compose rxjava1 Android-Orma Dagger2 Kotlin Coroutines & Flows Hilt -
2016 2021 In Google I/O 2017, the Android team announced
first-class support for Kotlin. Main Language JAVA Kotlin Supported Platform Android Android iOS web Main Libraries Jetpack Compose rxjava1 Android-Orma Dagger2 Kotlin Coroutines & Flows Hilt ΊͪΌͪ͘Ό มԽ͍ͯ͠Δ -
(Section1) Background & Goal ΧϯϑΝϨϯεΞϓϦͷྺ࢙Λඥղ͍ͯʑͷ։ൃͷώϯτʹ͠Α͏ ະདྷͷ"OESPJEΞϓϦ։ൃͷσϑΝΫτΛײ͡Α͏ ͕࣌มԽ͢Δத ࣮ͷτϨϯυ ϥΠϒϥϦ ΞʔΩςΫνϟ
Ͳ͏มΘͬͨͷ͔ΛΔ ظؒϝϯς͞Ε͍ͯΔ ػೳͷ࣮ஔ͖͑ ϦϑΝΫλϦϯά ͷ ಓඪΛ୳Δ -
(Section1) Background & Goal ΧϯϑΝϨϯεΞϓϦͷྺ࢙Λඥղ͍ͯʑͷ։ൃͷώϯτʹ͠Α͏ ະདྷͷ"OESPJEΞϓϦ։ൃͷσϑΝΫτΛײ͡Α͏ ͕࣌มԽ͢Δத ࣮ͷτϨϯυ ϥΠϒϥϦ ΞʔΩςΫνϟ
Ͳ͏มΘͬͨͷ͔ΛΔ ظؒϝϯς͞Ε͍ͯΔ ػೳͷ࣮ஔ͖͑ ϦϑΝΫλϦϯά ͷ ಓඪΛ୳Δ ະདྷͷ "OESPJEΞϓϦ։ൃʹ ඞཁʹͳΔࣝ ΞʔΩςΫνϟΛ ײ͡Δ -
എܠͱൃදͰ ࢦ͢ΰʔϧ ֤ͷ ηογϣϯ ใऔಘը໘ ࣮ ͷ %,BJHJΞϓϦ ͔Βඥղ͘ ະདྷͷ
σϑΝΫτ Section 1 Section 2 Section 3 Agenda -
എܠͱൃදͰ ࢦ͢ΰʔϧ ֤ͷ ηογϣϯ ใऔಘը໘ ࣮ ͷ %,BJHJΞϓϦ ͔Βඥղ͘ ະདྷͷ
σϑΝΫτ Section 1 Section 2 Section 3 Agenda -
(Section2) Implementation difference of each years ͜ͷηΫγϣϯͷత ֤ͷ࣮Λ؆୯ʹཧղ͠ɺ ࠩΛΔɻ
͜ΜͳʹมԽ͍ͯ͠Δͷ͔ʂͷ ڻ͖Λڞ༗͢Δɻ -
TUBUT 1SJWBUF ਓ +BWB"OESPJEPOMZ ΞʔΩςΫνϟ .7$ͬΆ͍ ࣌എܠ %SPJE,BJHJ͕Ͱ͖ͨɻ "OESPJEYܥ͕͡Θ͡Θͱਁಁ
"35͕σϑΥϧτͷϥϯλΠϜʹɻ ϚςϦΞϧσβΠϯͷొɻ ओͳϥΠϒϥϦ 4VQQPSUMJCSBSZ 'SBHNFOU "DUJWJUZ QSJWBUFͳͷͰϥΠϒϥϦৄࡉΘ͔Γ·ͤΜ 2015 !NIJEBLB͞Μ͔ΒͷঝʹΑͬͯ͜ͷͷࢿྉΛ࡞Ͱ͖·ͨ͠ɻେײँ🙇🙇 -
2016 TUBUT 044 ਓ +BWB"OESPJEPOMZ ΞʔΩςΫνϟ .7$ ࣌എܠ (PPHMF*0Ͱ%BUB#JOEJOH͕ൃදɻ "OESPJEYܥͷ࣌
ύʔϛογϣϯपΓ͕Ξοϓσʔτ %P[FϞʔυͷొ ओͳϥΠϒϥϦ 3Y+BWB %BHHFS "OESPJE0SNB 0L)UUQ 3FUSPGJU 4UFUIP %BUB#JOEJOH -
2016 Activity Fragment xml DAO Model ActivityNavigator DataBinding Orma API
Retrofit + OkHttp Observable(RxJava1) Call startActivityॲཧΛ୲͏ callback Call -
2016 Activity Fragment xml DAO Model ActivityNavigator DataBinding Orma API
Retrofit + OkHttp Observable(RxJava1) Call startActivityॲཧΛ୲͏ callback Call Model View Controller -
2016 Activity Fragment xml DAO Model ActivityNavigator DataBinding Orma API
Retrofit + OkHttp Observable(RxJava1) Call startActivityॲཧΛ୲͏ callback Call Model View Controller ංେԽ ෳࡶԽ -
2017 TUBUT 044 ਓ +BWB ,PUMJO "OESPJEPOMZ ΞʔΩςΫνϟ .77. 3FQPTJUPSZQBUUFSO
࣌എܠ ,PUMJO͕GJSTUTVQQPSUMBOHVBHFͱൃදɻ "OESPJEYܥͷ࣌ NVMUJXJOEPXNPEFͷొ ओͳϥΠϒϥϦ 3Y+BWB %BHHFS "OESPJE0SNB 0L)UUQ 3FUSPGJU 4UFUIP %BUB#JOEJOH 1FSNJTTJPO%JTQBUDIFS -
2017 Model Single/Maybe/Completable (RxJava2) Activity Fragment xml DataBinding LocalDataSource Orma
RemoteDataSource Retrofit + OkHttp Repository ViewModel call call call -
2017 Model Single/Maybe/Completable (RxJava2) Activity Fragment xml DataBinding LocalDataSource Orma
RemoteDataSource Retrofit + OkHttp Repository ViewModel call call call Model View ViewModel Repository -
2017 Model Single/Maybe/Completable (RxJava2) Activity Fragment xml DataBinding LocalDataSource Orma
RemoteDataSource Retrofit + OkHttp Repository ViewModel call call call Model View ViewModel Repository ੍ޚ -
2018 TUBUT 044 ਓ ,PUMJO"OESPJEPOMZ ΞʔΩςΫνϟ .77. 3FQPTJUPSZQBUUFSO ࣌എܠ "OESPJEYܥͷ࣌
QJDUVSFJOQJDUVSFͷαϙʔτ 'MVUUFSʹΑΔϚϧνϓϥοτϑΥʔϜ ओͳϥΠϒϥϦ 3Y+BWB %BHHFS 3PPN 0L)UUQ 3FUSPGJU (SPVQJF %BUB#JOEJOH "OESPJE ,59 -
2018 Model Single/Maybe/Completable/Flowable (RxJava2) Activity Fragment xml DataBinding Database Room
API Retrofit + OkHttp Repository ViewModel call call call LiveData -
2018 Model Single/Maybe/Completable/Flowable (RxJava2) Activity Fragment xml DataBinding Database Room
API Retrofit + OkHttp Repository ViewModel call call call LiveData data View ViewModel Repository -
2018 Model Single/Maybe/Completable/Flowable (RxJava2) Activity Fragment xml DataBinding Database Room
API Retrofit + OkHttp Repository ViewModel call call call LiveData data View ViewModel Repository ,PUMJOʹΑΔදݱͷγϯϓϧԽ ""$ͷ಄ 7JFX.PEFMͷංେԽɾ 7JFXͷෳࡶԽ -
2019 TUBUT 044 ਓ ,PUMJOɾ4XJGU"OESPJEɾJ04 ΞʔΩςΫνϟ 'MVY 3FQPTJUPSZ .VMUJ.PEVMF ࣌എܠ
,PUMJO$PSPVUJOFT͕੮ר "OESPJEYܥͷ࣌ ϊονελΠϧͷσΟεϓϨΠ ओͳϥΠϒϥϦ %BHHFS ,PUMJO$PSPVUJOFT ,UPS 0L)UUQ 4UFUIP (SPVQJF %BUB#JOEJOH 1JDBTP -
2019 Dispatcher Database Room API Ktor-client ActionCreator xml Store Fragment
Repository suspend call DataBinding BroadcastChannel suspend call suspend call suspend call LiveData call -
Dispatcher Database Room API Ktor-client ActionCreator xml Store Fragment Repository
suspend call DataBinding BroadcastChannel suspend call suspend call suspend call LiveData Flux call data Repository 2019 -
2020 TUBUT 044 ਓ ,PUMJOɾ4XJGU"OESPJEɾJ04 ΞʔΩςΫνϟ .77. 3FQPTJUPSZ .VMUJ.PEVMF ࣌എܠ
+FUQBDL$PNQPTFBMQIBͰΓ্͕Δɻ "OESPJEY Yܥͷ࣌ δΣενϟφϏήʔγϣϯͷରԠ ओͳϥΠϒϥϦ %BHHFS ,PUMJO$PSPVUJOFT'MPXT ,UPS 0L)UUQ 4UFUIP (SPVQJF %BUB#JOEJOH $PJM -
2020 Model Coroutines Flow Activity Fragment xml DataBinding Database Room
API Ktor-Client Repository ViewModel call Suspend call Suspend call LiveData -
2020 Model Coroutines Flow Activity Fragment xml DataBinding Database Room
API Ktor-Client Repository ViewModel call Suspend call Suspend call LiveData data View ViewModel Repository -
എܠͱൃදͰ ࢦ͢ΰʔϧ ֤ͷ ηογϣϯ ใऔಘը໘ ࣮ ͷ %,BJHJΞϓϦ ͔Βඥղ͘ ະདྷͷ
σϑΝΫτ Section 1 Section 2 Section 3 Agenda -
എܠͱൃදͰ ࢦ͢ΰʔϧ ֤ͷ ηογϣϯ ใऔಘը໘ ࣮ ͷ %,BJHJΞϓϦ ͔Βඥղ͘ ະདྷͷ
σϑΝΫτ Section 1 Section 2 Section 3 Agenda -
(Section3) Learn future de facto for Android app development from
conference app 2021. ͜ͷηΫγϣϯͷత ະདྷͷΞʔΩςΫνϟσϑΝΫτΛ DPOGFSFODFBQQ͔Βײ͡Δ +FUQBDL$PNQPTFͱͷ͖߹͍ํɾ ϚϧνϓϥοτϑΥʔϜͰͷ ڞ௨Խʹ͍ͭͯߟ͑Δ -
2021 TUBUT 044 ਓ ,PUMJOɾ4XJGU"OESPJEɾJ04 ΞʔΩςΫνϟ .77. .7* .VMUJNPEVMF ࣌എܠ
,..ʹΑΔϚϧνϓϥοτϑΥʔϜ "OESPJEͷ࣌ .BUFSJBM:PV ओͳϥΠϒϥϦ )JMU ,PUMJO$PSPVUJOFT'MPXT ,UPS %BUB4UPSF +FUQBDL$PNQPTF -
2021 Model Coroutines Flow Activity Fragment Jetpack Compose Database DataStore
API Ktor-Client Repository ViewModel call Suspend call Suspend call flow -
2021 Model Coroutines Flow Activity Fragment Jetpack Compose Database API
Ktor-Client Repository ViewModel call Suspend call Suspend call flow View DataStore -
2021 Model Coroutines Flow Activity Fragment Jetpack Compose Database DataStore
API Ktor-Client Repository ViewModel call Suspend call Suspend call flow -
2021 Model Coroutines Flow Activity Fragment Jetpack Compose Database API
Ktor-Client Repository ViewModel call Suspend call Suspend call flow Data (Android/iOS) DataStore -
2021 Data Compose Android iOS ViewModel Wrapper SwiftUI call flow
call flow ͲͪΒͷϓϥοτϑΥʔϜͰಈ͘Α͏ͳٕज़બఆ -
Conclusion 2021 2015 Dagger2 Hilt xml Compose rxjava1 rxjava2 coroutines
orma room DataStore Picasso Glide Coil -
[1] DroidKaigi, “DroidKaigi公式フィードアプリ” https://play.google.com/store/apps/details?id=io.github.droidkaigi.feeder [2] konifar, “DroidKaigi2016 Repository” https://github.com/konifar/droidkaigi2016 [3]
DroidKaigi, “DroidKaigi2017 Repository” https://github.com/DroidKaigi/conference-app-2017 [4] DroidKaigi, “DroidKaigi2018 Repository” https://github.com/DroidKaigi/conference-app-2018 [5] DroidKaigi, “DroidKaigi2019 Repository” https://github.com/DroidKaigi/conference-app-2019 [6] DroidKaigi, “DroidKaigi2020 Repository” https://github.com/DroidKaigi/conference-app-2020 [7] DroidKaigi, “DroidKaigi2021 Repository” https://github.com/DroidKaigi/conference-app-2021 [8] ⽇⾼正博,⼩⻄裕介,藤原聖,吉岡毅,今井智章, “Androidアプリ設計パターン⼊⾨” https://peaks.cc/books/architecture_patterns [9] Johannes, “The good and bad of modern app architecture” https://droidkaigi.jp/2019/timetable/70668 [10] mhidaka, “mhidakaさんのtweets” https://twitter.com/mhidaka/status/1441264050332061699 [11] konifar, “DroidKaigi2018-flutter Repository” https://github.com/konifar/droidkaigi2018-flutter [12] chigichan24, “DroidKaigi2019のコードを読み解く” https://speakerdeck.com/chigichan24/read-droidkaigi2019-app-source-code [13] Aakira, “flux with kotlin” https://speakerdeck.com/aakira/flux-with-kotlin-abema-dev-con-2016 [14] 釘宮慎之介,横幕圭真, “チームで育てるAndroidアプリ設計” https://peaks.cc/books/architecture_with_team [15] KenzoNirasawa, “iOSエンジニアがKMPで⼤規模アプリのロジック共通化をしてうまくできている話” https://speakerdeck.com/nirazo/iosdc2021 [16] Wikipedia, “Android version history” https://en.wikipedia.org/wiki/Android_version_history [17] chigichan24, “継続的に機能開発を進めながら⾏うマルチモジュール化” https://speakerdeck.com/chigichan24/ji-sok-de-niji-neng-kai-fa-wojin-menagaraxing-umarutimoziyuruhua [18] Google Developers, “アプリアーキテクチャガイド” https://developer.android.com/jetpack/guide [19] Google Developers, “開発者基調講演 (Google I/O ’17)” https://www.youtube.com/watch?v=EtQ8Le8-zyo