Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
KotlinでRealmを扱う
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Takahiro Hiasa
May 30, 2018
Programming
1.3k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
KotlinでRealmを扱う
Takahiro Hiasa
May 30, 2018
More Decks by Takahiro Hiasa
See All by Takahiro Hiasa
EMとしての醍醐味
takahia1988
0
130
日浅流、 エンジニアリングマネージャーのしごと
takahia1988
0
840
1つのアプリを開発する複数の職能横断チームの運用と今後 ~ タクシーアプリ「GO」の現状と未来 ~
takahia1988
1
9.2k
初めてのDroidKaigiプラチナスポンサー 〜エンジニアと作るスポンサー企画〜
takahia1988
0
350
どうする?GOする!LeSS導入する!?
takahia1988
0
5.3k
JapanTaxi × MOV = GOの開発体制とiOS14対応
takahia1988
0
1.6k
社内環境で紐解くfastlane match
takahia1988
0
930
Application Coordinatorを利用した画面遷移
takahia1988
0
1.6k
Other Decks in Programming
See All in Programming
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
150
速習iPhone Duo対応
yuukiw00w
2
940
Rでドレミ/Do-Re-Mi_with_R
florets1
0
110
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
20
20k
Are APIs Still Relevant in the AI Era?
soyuka
0
410
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
290
APNsからLive Activityを開始する話
yumnumm
0
150
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
1
2.1k
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
250
難しいけど、読めた。- OSSの入口に立った話。
sts11142
0
130
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
160
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
0
380
Featured
See All Featured
Done Done
chrislema
187
17k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
Building Adaptive Systems
keathley
44
3.2k
Making the Leap to Tech Lead
cromwellryan
135
10k
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
Facilitating Awesome Meetings
lara
57
7.2k
Agile that works and the tools we love
rasmusluckow
331
22k
Odyssey Design
rkendrick25
PRO
2
850
Scaling GitHub
holman
464
140k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
780
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
520
First, design no harm
axbom
PRO
2
1.3k
Transcript
KotlinでRealmを扱う Takahiro Hiasa @takahia 2018/05/30 集まれKotlin好き!Kotlin愛好会 vol1
⾃⼰紹介 ´ iOS, Server Side Java, Server Side Python ´
最近PrivateでAndroidをKotlinで開発してます! ´ Kotlinとの出会いは、 Spring Boot → Spring 5 RC → core libの⼀部がKotlinに置き換わ る → 勝⼿に社内APIをSpring Boot + KotlinでAPIを作ってみた ´ Kotlinはまだまだ初⼼者です
今⽇はAndroidでKotlinでRealmを扱った 話をします
Realmを扱う(example 1)
Realmを扱う(example 2)
なんて⾯倒くさいんだろう Transaction管理 CRUDの実装 毎回
Spring Boot(Server Side)でDBを扱う
そう、Spring Bootは ´ annotation1個でTransaction管理ができる ´ 共通のinterfaceで基本的なCRUDを実装できる
Motivation AndroidでRealmを簡単に実装したい
通常のTransaction管理
Kotlinっぽくinline関数で定義 ´ I/FはJavaEEの@Transactionalを参考
基本的なCRUDの実装を abstract classでBaseDaoを定義
BaseDaoを継承した DogDaoとPersonDaoを定義
Realmを扱う スッキリした!!
Spring Bootと⽐較すると Spring Boot Realm
まとめ ´ RealmのTransaction管理はinlineで定義して しまって共通化する ´ Realmの基本的なCRUDはabstract classで定 義してしまって共通化する
None