Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
ORMの選び方(Android編)
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
FUJI Goro
March 16, 2016
Technology
3.9k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ORMの選び方(Android編)
#potatotips 27 (2016/03/16) の資料です
FUJI Goro
March 16, 2016
Transcript
13 slides
ORMͷબͼํ ~ Androidฤ ~ #potatotips 2016/03/16 @__gfx__
ࣗݾհ • Engineer at eBook Initiative Japan • Android Engineer
• Recent Works: Android ORM, Static Gson, Robolectric-Instrumentation • rebuild.fm/133 ͰAndroid NͷΛͨ͠
None
ORM for Android • ͍·͍ͪϕετϓϥΫςΟε͕ఆ·Βͳ͍ྖҬ • ੲʮ͍͢͞ͷActiveAndroidʯͱʮͷ GreenDAOʯ͘Β͍͔͠બࢶ͕ͳ͔ͬͨ • ࠓ΄͔ʹDBFlow,
Requery, OrmaͳͲଟ • NoSQLͷRealmORMػೳΛͭDBͱͯ͠͞Ε ͍ͯΔ
ORMʹٻΊΔͷ • : ϦϑϨΫγϣϯ͍ɻίʔυੜ͖͢ • ϚΠάϨʔγϣϯ: ϚΠάϨʔγϣϯ͕ͭΒ͍ͱ ؾܰʹ͑ͳ͍ɻΧϥϜͷՃ͘Β͍ࣗಈͰͬ ͯ͘Ε •
؆୯: ੍Λ՝͞ͳ͍͜ͱʢe.g. ಛఆͷεʔύʔ Ϋϥε͕ඞཁʣɺίʔυิͱͷ૬ੑͷΑ͞
• AA: ϦϑϨΫγϣϯ༻ɻ͍ • DBFlow, Orma: ίʔυੜɻ͍ • Realm:
ಠࣗDB࣮ɻ͍ ※ ͳ͓Realmߴͱ͍ΘΕΔ͕ɺOrmaDBFlowͱ ͘ΒΔͱʮ͍έʔε͕͋Δʯͱ͍͏ఔ
ϚΠάϨʔγϣϯ • खͰϚΠάϨʔγϣϯίʔυΛॻ͖ͨ͘ͳ͍ w ""WFSTJPOTRMʹ42-Λॻ͘ w %#'MPXBEE$PMVNO -POHDMBTT UJNFTUBNQ
w 0SNBϦωʔϜҎ֎ίʔυෆཁ w 3FBMNBEE'JFME JE MPOHDMBTT
؆୯͞(1): Ϟσϧͷ੍ • ActiveAndroidRealmModelΫϥεΛܧঝ͢Δඞཁ͕͋Γɺ JSON serializeͳͲͰϋϚΔ • AAউखʹprimary keyΛ͚ͭͯϋϚΔ •
Orma, Requery੍ͳ͠ɺDBFlowΠϯλʔϑΣΠεͷ࣮ ΛٻΊΔ ※ ҎલͷRelamϞσϧϝιουΛఆٛͰ͖ͳ͍ͳͲͷ੍͕͋ͬ ͕ͨɺv0.88Ͱ΄ͱΜͲղফ͞Εͨ
؆୯͞(2): ΫΤϦϏϧμ • ίʔυίϯϓϦʔτͱͷ૬ੑΛߟ͑Δ • ""OFX4FMFDU GSPN *UFNDMBTT XIFSF OBNF
+BDL • %#'MPX 42-JUFTFMFDU GSPN *UFNDMBTT XIFSF *UFN@5BCMFOBNFFR +BDL • 0SNBPSNBTFMFDU'SPN*UFN OBNF&R +BDL • 3FBMNSFBMNXIFSF *UFNDMBTT FRVBMT OBNF +BDL
݁ • AAΛ͏ཧ༝ͳ͍ • Orma·͋·͋ΠέͯΔ • DBFlowͳ͔ͳ͔Α͍ɻϚΠάϨʔγϣϯ͠ͳ͍ͳ Β • Realm0.88͔Β͍ͩͿΑ͘ͳͬͨɻϚΠάϨʔγϣ
ϯ͠ͳ͍ͳΒ
OrmaͷΠέͯͳ͍ͱ͜Ζ • ރΕͯͳ͍ʢ։ൃΛ͡Ίͯ3ϲ݄͘Β͍ʣ • ෳࡶͳΫΤϦΛߏஙͰ͖ͳ͍ • has-one, has-many, many-to-manyͳͲͷ associationsͷαϙʔτ͕ශऑ
• ίʔυੜܥҰൠͷͱͯ͠ɺίϯύΠϧΤϥʔʹ ͳͬͨͱ͖ʹؔͳ͍Τϥʔ͕େྔʹग़ͯͭΒ͍
͓·͚: APK sizes • Normal App: 0.85MiB • Orma App:
0.97MB • Realm App: 5.30MB https://github.com/gfx/ORM-APK-Size-Example
https://github.com/gfx/Android-Orma
More Decks by FUJI Goro
See All by FUJI Goro
ステートレスなLLMでステートフルなAI agentを作る - YAPC::Fukuoka 2025
gfx
7
2.1k
How to Boost Your Code with WebAssembly
gfx
2
3.2k
AssemblyScriptでライブラリコードの高速化をしてみる
gfx
5
3.4k
実践TypeScriptトークバトル
gfx
1
1.3k
歴史的経緯の説明 as code
gfx
7
3k
Elasticsearchによる 全文検索の実装 in Rails
gfx
6
9.9k
すばらしきGraphQLのSEKAIへようこそ
gfx
20
10k
マルチテナント・ウェブアプリケーションの実践
gfx
14
9.9k
How to choose the ORM on Android
gfx
1
4.5k
Other Decks in Technology
See All in Technology
Del vibe coding a un Desarrollo (agéntico) fiable
jcabot
0
180
AIエージェントのアーキテクチャ設計
nsatoh
0
170
サーバーラックは作る時代! 3Dプリンターで作る10インチラックのススメ
jacopen
2
470
エンタープライズIAMについて - ID・権限をどう統制するか
oidfj
1
230
攻撃と守りは何が変わり、何が変わらないのか~最近の不正アクセスから考える、リスク評価と標準の使いどころ
oidfj
2
230
異夢同船〜異なる夢でも同じ船でなんとかする〜
fortegp05
1
540
落とし穴にハマってわかった 開発生産性を測るときに気をつけたいこと
munakata
3
430
OWASP AI Agentic Top10に準拠するクラウドネイティブなガードレールの実践(CNDW 2026)
keitah
1
300
メール到達性を支える、リンク先URLのドメイン評価の扱い方
wind111
0
170
メルカリの小規模チーム「Pod」で、 エンジニアがデータアナリストなしで、 AIを使ってデータ分析の自走を目指す取り組み
jackojacko_
0
190
【AWS reInvent 2026 関西組 事前勉強会】二度あることは三度ある~調子に乗りそうな3回目の私を戒めたいです~
ttelltte
0
110
Datadog の権限統制 〜Org 統合に向けて調べた注意点 / JDDUG-Meetup_24
visional_engineering_and_design
1
190
Featured
See All Featured
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Heart Work Chapter 1 - Part 1
lfama
PRO
11
37k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.3k
Building Better People: How to give real-time feedback that sticks.
wjessup
371
20k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
380
Side Projects
sachag
456
43k
Utilizing Notion as your number one productivity tool
mfonobong
4
650
Technical Leadership for Architectural Decision Making
baasie
4
650
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Designing for Timeless Needs
cassininazir
1
570
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k