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でRealmを扱う
Search
Takahiro Hiasa
May 30, 2018
Programming
1
1.2k
KotlinでRealmを扱う
Takahiro Hiasa
May 30, 2018
Tweet
Share
More Decks by Takahiro Hiasa
See All by Takahiro Hiasa
EMとしての醍醐味
takahia1988
0
110
日浅流、 エンジニアリングマネージャーのしごと
takahia1988
0
690
1つのアプリを開発する複数の職能横断チームの運用と今後 ~ タクシーアプリ「GO」の現状と未来 ~
takahia1988
1
8.6k
初めてのDroidKaigiプラチナスポンサー 〜エンジニアと作るスポンサー企画〜
takahia1988
0
280
どうする?GOする!LeSS導入する!?
takahia1988
0
5k
JapanTaxi × MOV = GOの開発体制とiOS14対応
takahia1988
0
1.4k
社内環境で紐解くfastlane match
takahia1988
0
850
Application Coordinatorを利用した画面遷移
takahia1988
0
1.6k
Other Decks in Programming
See All in Programming
Flutterで分数(Fraction)を表示する方法
koukimiura
0
130
スマホから Youtube Shortsを見られないようにする
lemolatoon
27
32k
Catch Up: Go Style Guide Update
andpad
0
230
Writing Better Go: Lessons from 10 Code Reviews
konradreiche
0
1.3k
Leading Effective Engineering Teams in the AI Era
addyosmani
6
440
Introducing ReActionView: A new ActionView-Compatible ERB Engine @ Kaigi on Rails 2025, Tokyo, Japan
marcoroth
3
1k
技術的負債の正体を知って向き合う / Facing Technical Debt
irof
0
180
Railsだからできる 例外業務に禍根を残さない 設定設計パターン
ei_ei_eiichi
0
910
CSC509 Lecture 03
javiergs
PRO
0
340
Devoxx BE - Local Development in the AI Era
kdubois
0
130
私達はmodernize packageに夢を見るか feat. go/analysis, go/ast / Go Conference 2025
kaorumuta
2
570
Claude Agent SDK を使ってみよう
hyshu
0
840
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
97
6.3k
Bash Introduction
62gerente
615
210k
The Pragmatic Product Professional
lauravandoore
36
6.9k
The World Runs on Bad Software
bkeepers
PRO
72
11k
Building Better People: How to give real-time feedback that sticks.
wjessup
369
20k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
KATA
mclloyd
32
15k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
9
590
Designing Experiences People Love
moore
142
24k
Gamification - CAS2011
davidbonilla
81
5.5k
What's in a price? How to price your products and services
michaelherold
246
12k
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