Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ORMの選び方(Android編)

FUJI Goro
March 16, 2016

 ORMの選び方(Android編)

#potatotips 27 (2016/03/16) の資料です

FUJI Goro

March 16, 2016
Tweet

More Decks by FUJI Goro

Other Decks in Technology

Transcript

  1. ࣗݾ঺հ • Engineer at eBook Initiative Japan • Android Engineer

    • Recent Works: Android ORM, Static Gson, Robolectric-Instrumentation • rebuild.fm/133 ͰAndroid Nͷ࿩Λͨ͠
  2. ଎౓ • AA: ϦϑϨΫγϣϯ࢖༻ɻ஗͍ • DBFlow, Orma: ίʔυੜ੒ɻ଎͍ • Realm:

    ಠࣗDB࣮૷ɻ଎͍ ※ ͳ͓Realm͸ߴ଎ͱ͍ΘΕΔ͕ɺOrma΍DBFlowͱ ͘Β΂Δͱʮ଎͍έʔε͕͋Δʯͱ͍͏ఔ౓
  3. ؆୯͞(1): Ϟσϧͷ੍໿ • ActiveAndroid΍Realm͸ModelΫϥεΛܧঝ͢Δඞཁ͕͋Γɺ JSON serializeͳͲͰϋϚΔ • AA͸উखʹprimary keyΛ͚ͭͯϋϚΔ •

    Orma, Requery͸੍໿ͳ͠ɺDBFlow͸ΠϯλʔϑΣΠεͷ࣮૷ ΛٻΊΔ ※ ҎલͷRelamϞσϧ͸ϝιουΛఆٛͰ͖ͳ͍ͳͲͷ੍໿͕͋ͬ ͕ͨɺv0.88Ͱ΄ͱΜͲղফ͞Εͨ
  4. ؆୯͞(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
  5. ͓·͚: APK sizes • Normal App: 0.85MiB • Orma App:

    0.97MB • Realm App: 5.30MB https://github.com/gfx/ORM-APK-Size-Example