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
120
日浅流、 エンジニアリングマネージャーのしごと
takahia1988
0
800
1つのアプリを開発する複数の職能横断チームの運用と今後 ~ タクシーアプリ「GO」の現状と未来 ~
takahia1988
1
9k
初めてのDroidKaigiプラチナスポンサー 〜エンジニアと作るスポンサー企画〜
takahia1988
0
330
どうする?GOする!LeSS導入する!?
takahia1988
0
5.2k
JapanTaxi × MOV = GOの開発体制とiOS14対応
takahia1988
0
1.5k
社内環境で紐解くfastlane match
takahia1988
0
910
Application Coordinatorを利用した画面遷移
takahia1988
0
1.6k
Other Decks in Programming
See All in Programming
霧の中の代数的エフェクト
funnyycat
1
250
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
360k
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
340
20260623_Loop Engineeringで自分の分身の問い合わせBotを作る
ryugen04
0
130
【やさしく解説 設計編 #0】DDDのコード、読めるのに分からない人へ
panda728
PRO
1
220
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
0
130
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
130
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
340
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
290
dRuby over BLE
makicamel
2
410
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
220
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
430
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
[SF Ruby Conf 2025] Rails X
palkan
2
1.1k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
180
Facilitating Awesome Meetings
lara
57
7k
WCS-LA-2024
lcolladotor
0
670
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
870
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
760
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
310
Balancing Empowerment & Direction
lara
6
1.2k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Technical Leadership for Architectural Decision Making
baasie
3
430
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