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
Modern Java Libraries with Kotlin
Search
Keisuke Kobayashi
May 24, 2017
Programming
0
1.7k
Modern Java Libraries with Kotlin
potatotips #40
Keisuke Kobayashi
May 24, 2017
Tweet
Share
More Decks by Keisuke Kobayashi
See All by Keisuke Kobayashi
プロダクト開発をAI 1stに変革する〜SaaS is dead時代で生き残るために〜 / AI 1st Product Development
kobakei
0
2.1k
今日から始める依存性の注入 / First Time Dependency Injection
kobakei
26
7.7k
iOSアプリの技術的負債をどう返済したか / How to repay the technical debt of iOS app
kobakei
2
1k
iOSアプリ内で不正なSSL証明書を検知する / SSL Pinning for iOS apps
kobakei
34
12k
Kyashアプリ開発の現場
kobakei
4
2.9k
Review of Google I/O 2017 & Prepare for Google I/O 2018
kobakei
0
340
APIクライアントをCodableで置き換えた話
kobakei
0
1.6k
開発者が知っておきたい通知の歴史
kobakei
9
7.8k
mockito-kotlin
kobakei
1
540
Other Decks in Programming
See All in Programming
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
120
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
480
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
170
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
200
AtCoder Conference 2025
shindannin
0
1k
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
420
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
370
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.8k
高速開発のためのコード整理術
sutetotanuki
1
380
Vibe codingでおすすめの言語と開発手法
uyuki234
0
220
Featured
See All Featured
Leo the Paperboy
mayatellez
4
1.4k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
320
The Cult of Friendly URLs
andyhume
79
6.8k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
0
3.4k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
210
Fireside Chat
paigeccino
41
3.8k
How to Talk to Developers About Accessibility
jct
2
130
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.6k
Being A Developer After 40
akosma
91
590k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
66
36k
Transcript
Modern Java Libraries with Kotlin Keisuke Kobayashi / @kobakei potatotips
#40
About me • Keisuke Kobayashi • GitHub, Qiita: @kobakei •
Twitter: @kobakei122 • Kyash, Inc
None
ࠓ͢͜ͱ • ݪଇJavaϥΠϒϥϦKotlinͰ େମͦͷ··͑·͢ • Ұ෦ಛผʹରԠ͕ඞཁͳͷΛհ͠·͢
Dagger2 + Orma
Dagger2 + Orma • kaptͰࣗಈੜ͞ΕΔΫϥεDaggerͰ provideͰ͖ͳ͍ • ͭ·ΓOrmaDatabase
NG: Ϗϧυ͕௨Βͳ͍ @Module class AppModule(private val context: Context) { @Singleton
@Provides fun provideOrmaDatabase(context: Context): OrmaDatabase { return OrmaDatabase.builder(context).build() } }
ղܾࡦ • OrmaDatabaseΛϥοϓ͢Δ͚ͩͷΫϥεΛ ࡞ͬͯɺͦΕΛprovide͢Δ
OrmaHolder class OrmaHolder(val context: Context) { val ormaDatabase = OrmaDatabase.builder(context).build()
}
Dagger Module @Module class AppModule(private val context: Context) { @Singleton
@Provides fun provideOrmaHolder(context: Context): OrmaHolder { return OrmaHolder(context) } }
Data Binding
Data binding • dependenciesʹkaptͰՃ android { dataBinding { enabled true
} } dependencies { kapt 'com.android.databinding:compiler:x.y.z' }
Parceler
Parceler • ParcelableͷϘΠϥʔϓϨʔτΛࣗಈੜ͢Δ ϥΠϒϥϦ • data classͰParcelerΛ͍͍ͨ
data class • toString, hasCodeͷ࣮ෆཁ data class User ( val
email: String?, val userName: String?, )
data class with Parceler • ͜Εͩͱಈ͔ͳ͍ʢϓϩύςΟ͋Δ͕ϑΟʔϧυ Ͱͳ͍ͨΊʣ @Parcel data class
User ( val email: String?, val userName: String?, )
data class with Parceler • ͜ΕͰϓϩύςΟܦ༝ͰಡΈॻ͖ͯ͘͠ΕΔ @Parcel(Parcel.Serialization.BEAN) data class User
@ParcelConstructor constructor( val email: String?, val userName: String?, )
͓·͚: αϯϓϧॻ͖·ͨ͠ • https://github.com/kobakei/Android-Kotlin- Example
Thanks!