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.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
810
1つのアプリを開発する複数の職能横断チームの運用と今後 ~ タクシーアプリ「GO」の現状と未来 ~
takahia1988
1
9.1k
初めてのDroidKaigiプラチナスポンサー 〜エンジニアと作るスポンサー企画〜
takahia1988
0
340
どうする?GOする!LeSS導入する!?
takahia1988
0
5.2k
JapanTaxi × MOV = GOの開発体制とiOS14対応
takahia1988
0
1.5k
社内環境で紐解くfastlane match
takahia1988
0
920
Application Coordinatorを利用した画面遷移
takahia1988
0
1.6k
Other Decks in Programming
See All in Programming
これって Effect でできたのでは? / TSKaigi Mashup Kansai #2
susisu
0
250
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
390
PHP Application における Kubernetes 内 gRPC 通信
ganchiku
0
600
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
190
PHP に部分適用が来るぞ!……ところで何それ?おいしいの? #phpcon / phpcon-2026
shogogg
0
700
仕様書を書く前にハーネスを作る - Agent Native開発は「探索を速く、判定を固く」
gotalab555
4
1.7k
torikago - Ruby::Boxで照らすモジュラモノリスの実行境界
se4weed
1
390
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
640
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
1.1k
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
480
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
210
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
570
Featured
See All Featured
Building Applications with DynamoDB
mza
96
7.2k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
1.1k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
250
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.5k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
Balancing Empowerment & Direction
lara
6
1.2k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
670
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
420
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