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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Keisuke Kobayashi
May 24, 2017
Programming
1.8k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Modern Java Libraries with Kotlin
potatotips #40
Keisuke Kobayashi
May 24, 2017
More Decks by Keisuke Kobayashi
See All by Keisuke Kobayashi
AI 1st でエンタープライズ SaaS を立ち上げる / AI 1st Enterprise SaaS
kobakei
1
260
プロダクト開発をAI 1stに変革する〜SaaS is dead時代で生き残るために〜 / AI 1st Product Development
kobakei
0
2.8k
今日から始める依存性の注入 / First Time Dependency Injection
kobakei
26
7.8k
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
3k
Review of Google I/O 2017 & Prepare for Google I/O 2018
kobakei
0
350
APIクライアントをCodableで置き換えた話
kobakei
0
1.6k
開発者が知っておきたい通知の歴史
kobakei
9
7.9k
Other Decks in Programming
See All in Programming
AIキャラアプリkaiwaの低遅延音声通話基盤をどう作ったか - AWS Gravitonで支える低遅延・低コストAI Agent基盤
mogamit
0
160
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
220
関数型プログラミングのメリットって何だろう?
wanko_it
0
150
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
350
壊れたパーサから始める関数型設計と構成的なパーサ #fp_matsuri
raiga0310
2
180
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
350
アルゴリズムは何を圧縮しているのか ─ Haskell から育った「圧縮代数」というメンタルモデル
naoya
15
3.1k
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
200
Claude Opus 4.6以後の受託開発エンジニアの変化(Claude Code開発ノウハウ大公開スペシャルbyクラスメソッド)
iidatakuma
1
390
継続モナドとリアクティブプログラミング
yukikurage
3
450
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.8k
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
140
Featured
See All Featured
Everyday Curiosity
cassininazir
0
250
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
72
40k
KATA
mclloyd
PRO
35
15k
Navigating Team Friction
lara
192
16k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
370
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
250
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
200
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
My Coaching Mixtape
mlcsv
0
170
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
180
Product Roadmaps are Hard
iamctodd
55
12k
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!