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
KotlinとReduxをAndroidアプリに導入したら
Search
Fukui Atsuko
September 01, 2017
Technology
6
4.7k
KotlinとReduxをAndroidアプリに導入したら
KotlinとReduxをAndroidアプリに導入したら
KotlinとReduxをAndroidアプリに導入して得られた知見を共有します。
Fukui Atsuko
September 01, 2017
Tweet
Share
More Decks by Fukui Atsuko
See All by Fukui Atsuko
こんな時どう書くの? 逆引きKotlin入門
muumuumuumuu
3
1.4k
Kotlin導入作戦
muumuumuumuu
4
550
Sometimes Swift confuses Kotlin engineers.
muumuumuumuu
0
670
How to find problem causes and performance improvement
muumuumuumuu
6
4.2k
Other Decks in Technology
See All in Technology
[CV勉強会@関東 CVPR2025 読み会] MegaSaM: Accurate, Fast, and Robust Structure and Motion from Casual Dynamic Videos (Li+, CVPR2025)
abemii
0
190
開発と脆弱性と脆弱性診断についての話
su3158
1
1.1k
MySQL HeatWave:サービス概要のご紹介
oracle4engineer
PRO
4
1.7k
トヨタ生産方式(TPS)入門
recruitengineers
PRO
3
240
JuniorからSeniorまで: DevOpsエンジニアの成長ロードマップ
yuriemori
0
220
AIエージェント就活入門 - MCPが履歴書になる未来
eltociear
0
530
GitHub Copilot coding agent を推したい / AIDD Nagoya #1
tnir
3
4.6k
実践アプリケーション設計 ③ドメイン駆動設計
recruitengineers
PRO
3
210
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
8.6k
Effective Match Types - Scala Days 2025
bishabosha
1
110
小さなチーム 大きな仕事 - 個人開発でAIをフル活用する
himaratsu
0
120
自社製CMSからmicroCMSへのリプレースがプロダクトグロースを加速させた話
nextbeatdev
0
140
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
1k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
The Cult of Friendly URLs
andyhume
79
6.5k
Being A Developer After 40
akosma
90
590k
A better future with KSS
kneath
239
17k
Practical Orchestrator
shlominoach
190
11k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
139
34k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
Become a Pro
speakerdeck
PRO
29
5.5k
Designing Experiences People Love
moore
142
24k
Git: the NoSQL Database
bkeepers
PRO
431
65k
Transcript
,PUMJOͱ3FEVYΛ "OESPJEΞϓϦʹಋೖͨ͠Β 3FUUZ5FDI/JHIU!3FUUZΦϑΟε
"CPVUNF • Ҫರࢠ / Fukui Atsuko • @muumuumuumuu • Retty,
Inc. • AndroidΤϯδχΞ • ͦͷલΈࠐΈܥAndroidͷ͓ࣄ
ࠃ/P໊࣮άϧϝαʔϏε3FUUZͷӡӦ ઃཱ XFCͱΞϓϦͰαʔϏεల։ γϯάϧυϝΠϯ εϚϗϑΝʔετ ݄ؒར༻ऀສ
ͦΜͳ3FUUZͷ "OESPJEνʔϜ͕࠷ۙࢼ͍ͯ͠Δ ,PUMJOͱ3FEVYͷΈ߹Θͤ ʹ͍͓ͭͯ͠͠·͢ɻ
"HFOEB • લఏࣝ: Kotlin / Redux ʹ͍ͭͯ • ಘΒΕͨݟ •
·ͩΜͰ͍Δ෦
,PUMJO
,PUMJO • 2011ʹJetBrain͔ࣾΒൃද͞Εͨϓϩάϥ ϛϯάݴޠ • Better Java ͳݴޠ • JavaͱڞଘՄೳ
• ؔܕϓϩάϥϛϯάͷελΠϧΛαϙʔτ • ͔Θ͍͍
3FEVY
3FEVY • React js ͔Βग़͖ͯͨઃܭࢥ • Three Principles • Single
source of truth • State is read-only • Changes are made with pure functions
3FEVY
ಋೖʹ͋ͨͬͯ
3FEVY-JCSBSZ • ࣾͰ࡞ͬͯެ։͠·ͨ͠ • https://github.com/RettyEng/redux-kt • ReSwiftΛϦεϖΫτ • طଘͷLibraryݕ౼͚ͨ͠ͲσϑΝΫτ͕ͳ ͍ঢ়ଶ
%FNP
3FEVY
͠Β͘ࢼͯ͠ಘΒΕͨݟ
͕͜͜خ͍͠ • Activity/Fragment/ViewΛލ͍ͰใΛڞ༗ Ͱ͖Δ • StateͷมߋΛ͢Δ෦͕Viewͷߋ৽ͷ ͔ΒશʹͰ͖Δ • View͕Ͳ͏มΘΔ͔ؔ৺ͷର֎ •
APIίʔϧΛͨͣը໘දࣔͰ͖Δ
͍͍ͯΔαʔϏε • ෳͷը໘ͰใΛڞ༗͍ͯ͠Δ • ը໘ભҠͷύλʔϯ͕ෳ͋Δ
͍͍ͯͳ͍αʔϏε • ΞϓϦ֎͔ΒϦΞϧλΠϜʹใ͕มΘΓ͏ Δ • ෆشൃใΛͨ͘͞Μѻ͏ඞཁ͕͋Δ • State͕͖࣋ͭใͷαΠζ͕େ͖͍
,PUMJOͱ૬ੑͷྑ͞ • Stateͷ͕࣋ͭnullڐ༰͔Ͳ͏͔ίʔυͰࣔ ͤΔ • Viewଆͷίʔυ͕ॻ͖͍͢
,PUMJOͱ૬ੑͷྑ͞ • Test͕ॻ͖͍͢ • Reducer͕७ਮؔͳͷͰmockͳ͠Ͱςε τ͕ॻ͚Δ
,PUMJOͱ૬ੑͷྑ͞ • Stateͷૢ࡞͕ॻ͖͍͢ • dataΫϥεͷcopy()ϝιουͰมߋ͢ΔՕॴ Λ໌ࣔతʹࢦఆͰ͖Δ
·ͩΜͰ͍Δͱ͜Ζ
4UBUFͷ࣋ͪํ • ͲͷใΛͲ͏͍͏෩ʹStateͱͯ͠อ࣋͢Δ ͔ͱͯΉ • ͓ͦΒ͘ਖ਼ղͳ͍ • αʔϏεΞϓϦʹΑͬͯมΘͬͯ͘Δ • Ͱ։ൃऀؒͰ͋Δఔҙࣝ߹Θ͕ͤඞཁ
4UBUFͷੜଘظؒ • Applicationͱಉ͡ʢΦϯϝϞϦͳใʣ • όοΫάϥϯυʹճͬͨ࣌ʹΞϓϦϓϩηε ͕kill͞ΕΔͱҰॹʹใ͕ࣦΘΕΔ • ͍ࣦͭΘΕ͍͍ͯใ͔͠ࡌͤͳ͍ • SharedPreference͔αʔόʹୀආ͢Δ
ϝϞϦੜଘظؒ • Application͕ੜ͖͍ͯΔݶΓղ์͞Εͳ͍ ϝϞϦͨͪ • Rettyॏ͍ͨσʔλΛอ࣋͢Δέʔε͕ͳ͍ ͷͰࠓͷॴେৎ
·ͱΊ
·ͱΊ • Kotlin / Redux ͷΈ߹ΘͤΛಋೖͯ֓͠Ͷ ѱ͍ͱ͜ΖݟͨΒͣͤͰ͢ • ͨͩ͠αʔϏεͷੑ࣭ͱѻ͏σʔλʹΑΓ· ͢
• Ұࢼͯ͠ΈΔͷΞϦʂ • ͥͻLibraryͬͯΈ͍ͯͩ͘͞ʂ٩( 'ω' )و
͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ
͔͜͜Βઌ͕࣌ؒ͋Ε
'MVYʹ͠Α͏͔Ή • Reduxͱಉ͘͡σʔλͷྲྀΕ͕Ұํ௨ߦ • ReduxFlux͔Βੜͨ͠ߟ͑ํ • ͨͩ͠StoreΛෳ࣋ͪ͏Δ
'MVYʹ͠Α͏͔Ή • ActivityΛލ͕ͳ͍͚ͲɺෳͷView Component ͰใΛڞ༗͍ͨ͠ • ΞϓϦશମͷStoreʹͷͤΔใͱͯ͠ෆదͳ ؾ͕͢Δ • ୯Ұػೳ͚ͩͰ͔͠Θͳ͍Store͕ཉ͘͠ͳΔ
• ੜଘظؒActivityʹ߹ΘͤΒΕΔͷͰίϯτ ϩʔϧ͍͢͠