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.2k
マルチテナント・ウェブアプリケーションの実践
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
12 Days of OpenAIから読み解く、生成AI 2025年のトレンド
shunsukeono_am
0
140
Yahoo! ズバトクにおけるフロントエンド開発
lycorptech_jp
PRO
0
100
AWS環境におけるランサムウェア攻撃対策の設計
nrinetcom
PRO
0
170
UI State設計とテスト方針
rmakiyama
3
800
コンテナセキュリティのためのLandlock入門
nullpo_head
2
330
.NET 9 のパフォーマンス改善
nenonaninu
0
1.3k
watsonx.ai Dojo #5 ファインチューニングとInstructLAB
oniak3ibm
PRO
0
190
20241220_S3 tablesの使い方を検証してみた
handy
4
700
事業貢献を考えるための技術改善の目標設計と改善実績 / Targeted design of technical improvements to consider business contribution and improvement performance
oomatomo
0
150
サーバーなしでWordPress運用、できますよ。
sogaoh
PRO
0
120
GitHub Copilot のテクニック集/GitHub Copilot Techniques
rayuron
39
16k
LINEスキマニにおけるフロントエンド開発
lycorptech_jp
PRO
0
340
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.4k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
170
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.1k
Building Adaptive Systems
keathley
38
2.3k
The World Runs on Bad Software
bkeepers
PRO
66
11k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
Music & Morning Musume
bryan
46
6.2k
Building Applications with DynamoDB
mza
91
6.1k
Gamification - CAS2011
davidbonilla
80
5.1k
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