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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
120
日浅流、 エンジニアリングマネージャーのしごと
takahia1988
0
740
1つのアプリを開発する複数の職能横断チームの運用と今後 ~ タクシーアプリ「GO」の現状と未来 ~
takahia1988
1
8.8k
初めてのDroidKaigiプラチナスポンサー 〜エンジニアと作るスポンサー企画〜
takahia1988
0
310
どうする?GOする!LeSS導入する!?
takahia1988
0
5.1k
JapanTaxi × MOV = GOの開発体制とiOS14対応
takahia1988
0
1.5k
社内環境で紐解くfastlane match
takahia1988
0
880
Application Coordinatorを利用した画面遷移
takahia1988
0
1.6k
Other Decks in Programming
See All in Programming
Rで始めるML・LLM活用入門
wakamatsu_takumu
0
160
AWS Infrastructure as Code の新機能 2025 総まとめ 〜SA 4人による怒涛のデモ祭り〜
konokenj
10
3.2k
Geminiの機能を調べ尽くしてみた
naruyoshimi
0
200
Unity6.3 AudioUpdate
cova8bitdots
0
110
grapheme_strrev関数が採択されました(あと雑感)
youkidearitai
PRO
1
210
Agent Skills Workshop - AIへの頼み方を仕組み化する
gotalab555
15
8.1k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
270
Go Conference mini in Sendai 2026 : Goに新機能を提案し実装されるまでのフロー徹底解説
yamatoya
0
520
CSC307 Lecture 12
javiergs
PRO
0
460
SourceGeneratorのマーカー属性問題について
htkym
0
170
The Ralph Wiggum Loop: First Principles of Autonomous Development
sembayui
0
3.7k
AIプロダクト時代のQAエンジニアに求められること
imtnd
2
730
Featured
See All Featured
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
130
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
99
Discover your Explorer Soul
emna__ayadi
2
1.1k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
810
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
80
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.1k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
980
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Thoughts on Productivity
jonyablonski
75
5.1k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
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