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
ORMの選び方(Android編)
Search
FUJI Goro
March 16, 2016
Technology
2
3.8k
ORMの選び方(Android編)
#potatotips 27 (2016/03/16) の資料です
FUJI Goro
March 16, 2016
Tweet
Share
More Decks by FUJI Goro
See All by FUJI Goro
How to Boost Your Code with WebAssembly
gfx
2
2.8k
AssemblyScriptでライブラリコードの高速化をしてみる
gfx
5
3k
実践TypeScriptトークバトル
gfx
1
1.1k
歴史的経緯の説明 as code
gfx
7
2.7k
Elasticsearchによる 全文検索の実装 in Rails
gfx
6
9.4k
すばらしきGraphQLのSEKAIへようこそ
gfx
20
9.3k
マルチテナント・ウェブアプリケーションの実践
gfx
14
9.5k
How to choose the ORM on Android
gfx
1
4.2k
How Do We Get Along With Static Types
gfx
5
3.3k
Other Decks in Technology
See All in Technology
WantedlyでのKotlin Multiplatformの導入と課題 / Kotlin Multiplatform Implementation and Challenges at Wantedly
kubode
0
250
My small contributions - Fujiwara Tech Conference 2025
ijin
0
1.5k
re:Invent 2024のふりかえり
beli68
0
110
Copilotの力を実感!3ヶ月間の生成AI研修の試行錯誤&成功事例をご紹介。果たして得たものとは・・?
ktc_shiori
0
370
Godot Engineについて調べてみた
unsoluble_sugar
0
440
ドメイン駆動設計の実践により事業の成長スピードと保守性を両立するショッピングクーポン
lycorptech_jp
PRO
14
2.5k
Evolving Architecture
rainerhahnekamp
3
260
メンバーがオーナーシップを発揮しやすいチームづくり
ham0215
2
210
深層学習と3Dキャプチャ・3Dモデル生成(土木学会応用力学委員会 応用数理・AIセミナー)
pfn
PRO
0
460
生成AIのビジネス活用
seosoft
0
110
.NET AspireでAzure Functionsやクラウドリソースを統合する
tsubakimoto_s
0
190
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
6
55k
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
Agile that works and the tools we love
rasmusluckow
328
21k
Statistics for Hackers
jakevdp
797
220k
Become a Pro
speakerdeck
PRO
26
5.1k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Building Applications with DynamoDB
mza
93
6.2k
Side Projects
sachag
452
42k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.3k
Designing for Performance
lara
604
68k
Docker and Python
trallard
43
3.2k
Transcript
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