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
720
1つのアプリを開発する複数の職能横断チームの運用と今後 ~ タクシーアプリ「GO」の現状と未来 ~
takahia1988
1
8.7k
初めてのDroidKaigiプラチナスポンサー 〜エンジニアと作るスポンサー企画〜
takahia1988
0
300
どうする?GOする!LeSS導入する!?
takahia1988
0
5.1k
JapanTaxi × MOV = GOの開発体制とiOS14対応
takahia1988
0
1.4k
社内環境で紐解くfastlane match
takahia1988
0
870
Application Coordinatorを利用した画面遷移
takahia1988
0
1.6k
Other Decks in Programming
See All in Programming
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
240
從冷知識到漏洞,你不懂的 Web,駭客懂 - Huli @ WebConf Taiwan 2025
aszx87410
2
3.2k
tsgolintはいかにしてtypescript-goの非公開APIを呼び出しているのか
syumai
7
2.4k
Python札幌 LT資料
t3tra
7
1.1k
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
290
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
470
TerraformとStrands AgentsでAmazon Bedrock AgentCoreのSSO認証付きエージェントを量産しよう!
neruneruo
4
2.2k
Implementation Patterns
denyspoltorak
0
140
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
150
Go コードベースの構成と AI コンテキスト定義
andpad
0
150
Combinatorial Interview Problems with Backtracking Solutions - From Imperative Procedural Programming to Declarative Functional Programming - Part 2
philipschwarz
PRO
0
130
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
8
3.5k
Featured
See All Featured
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
64
A better future with KSS
kneath
240
18k
Navigating Weather and Climate Data
rabernat
0
60
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Paper Plane (Part 1)
katiecoart
PRO
0
2.6k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
150
New Earth Scene 8
popppiees
0
1.3k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
2
270
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