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
KotlinでRealmを扱う
Takahiro Hiasa
May 30, 2018
More Decks by Takahiro Hiasa
See All by Takahiro Hiasa
EMとしての醍醐味
takahia1988
0
120
日浅流、 エンジニアリングマネージャーのしごと
takahia1988
0
760
1つのアプリを開発する複数の職能横断チームの運用と今後 ~ タクシーアプリ「GO」の現状と未来 ~
takahia1988
1
8.9k
初めてのDroidKaigiプラチナスポンサー 〜エンジニアと作るスポンサー企画〜
takahia1988
0
310
どうする?GOする!LeSS導入する!?
takahia1988
0
5.2k
JapanTaxi × MOV = GOの開発体制とiOS14対応
takahia1988
0
1.5k
社内環境で紐解くfastlane match
takahia1988
0
890
Application Coordinatorを利用した画面遷移
takahia1988
0
1.6k
Other Decks in Programming
See All in Programming
Lightning-Fast Method Calls with Ruby 4.1 ZJIT / RubyKaigi 2026
k0kubun
3
600
Vibe NLP for Applied NLP
inesmontani
PRO
0
440
事業会社でのセキュリティ長期インターンについて
masachikaura
0
250
🦞OpenClaw works with AWS
licux
1
150
Making the RBS Parser Faster
soutaro
0
440
PHPで TLSのプロトコルを実装してみるをもう一度しゃべりたい
higaki_program
0
210
Claude Code × Gemini × Ebitengine ゲーム制作素人WebエンジニアがGoでゲームを作った話
webzawa
0
140
CursorとClaudeCodeとCodexとOpenCodeを実際に比較してみた
terisuke
1
470
属人化しないコード品質の作り方_2026.04.07.pdf
muraaano
0
210
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
3
280
CDK Deployのための ”反響定位”
watany
4
790
iOS機能開発のAI環境と起きた変化
ryunakayama
0
190
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.8k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
The Pragmatic Product Professional
lauravandoore
37
7.2k
How to train your dragon (web standard)
notwaldorf
97
6.6k
Utilizing Notion as your number one productivity tool
mfonobong
4
290
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.6k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Optimising Largest Contentful Paint
csswizardry
37
3.6k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.9k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
250
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