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

Realm Java updates March 2016

358791a9c91e7615ffe62c7c6e02e470?s=47 zaki50
March 14, 2016

Realm Java updates March 2016

358791a9c91e7615ffe62c7c6e02e470?s=128

zaki50

March 14, 2016
Tweet

Transcript

  1. Realm Japan Meetup #13

  2. https://github.com/kishikawakatsumi/ kishikawa katsumi http://kishikawakatsumi.hatenablog.com/ Realm

  3. Makoto Yamazaki twitter: @zaki50 https://github.com/zaki50 Realm

  4. #realm_jp

  5. Recent Updates

  6. Realm Java 0.88.1 (was 0.87.5)

  7. IUUQTSFBMNJPKQOFXTSFBMNKBWB

  8. Realm Java 0.88.0(ඇޓ׵ͳมߋ1) w (SBEMFϓϥάΠϯΛ࢖༻͢Δઃఆ΁มߋ͢Δඞཁ͕͋Γ·͢ɻ w \3FBMN %ZOBNJD3FBMN^FYFDVUF5SBOTBDUJPO ͸ɺτϥϯβΫγϣ ϯϒϩοΫͰൃੜ࣮ͨ͠ߦ࣌ྫ֎Λ3FBMN&YDFQUJPOͰϥοϓͤͣ

    ʹͦͷ··εϩʔ͠·͢ɻ   w \3FBMN %ZOBNJD3FBMN^FYFDVUF5SBOTBDUJPO ʹOVMMΛ౉͢ͱ *MMFHBM"SHVNFOU&YDFQUJPOΛεϩʔ͠·͢ɻ w ෆਖ਼ͳαϩήʔτϖΞΛؚΉจࣈྻΛTFUUFSʹ౉ͨ͠৔߹ʹεϩʔ ͞ΕΔྫ֎͕3FBMN&SSPS͔Β*MMFHBM"SHVNFOU&YDFQUJPOʹมߋ͞ Ε·͢ɻ
  9. ϓϩδΣΫτͷηοτΞοϓํ๏ͷมߋ CVJMETDSJQU\ SFQPTJUPSJFT\ KDFOUFS  ^ EFQFOEFODJFT\ DMBTTQBUIJPSFBMNSFBMNHSBEMFQMVHJO ^ ^

    BQQMZQMVHJOSFBMNBOESPJE SFQPTJUPSJFT\ KDFOUFS  ^ EFQFOEFODJFT\ DPNQJMFJPSFBMNSFBMNBOESPJE ^ CF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 w $IBOHF-JTUFOFS͕ొ࿥͞ΕͨεϨουͱಉ͡εϨουͰมߋΛDPNNJUͨ͠৔߹ɺ ͍··Ͱ͸ଈ࠲ʹϦεφʔ͕ݺ͹Ε͍ͯ·͕ͨ͠ɺ-PPQFSͷͷ࣍ͷΠϕϯτॲཧ ·Ͱ஗Ԇ͞ΕΔΑ͏ʹͳΓ·͢ɻ w ͰEFQSFDBUFEʹͳ͍ͬͯͨ3FBMN$POpHVSBUJPOHFU4DIFNB.FEJBUPS Λ࡟আ͠·ͨ͠ɻϞσϧΫϥεҰཡΛऔಘ͢Δ৔߹͸ 3FBMN$POpHVSBUJPOHFU3FBMN0CKFDU$MBTTFT Λ࢖༻͍ͯͩ͘͠͞ɻ 
  13. ಉҰεϨουͰͷϦεφʔൃՐλΠϛϯά SFBMNCFHJO5SBOTBDUJPO  .PEFMNPEFMSFBMNDSFBUF0CKFDU "MM5ZQFTDMBTT  SFBMNDPNNJU5SBOTBDUJPO  NPEFMBEE$IBOHF-JTUFOFS OFX3FBMN$IBOHF-JTUFOFS

    \ !0WFSSJEF QVCMJDWPJEPO$IBOHF \ 4ZTUFNPVUQSJOUMO MJTUFOFSDBMMFE  ^ ^  SFBMNCFHJO5SBOTBDUJPO  NPEFMTFU/BNF *DIJSP  SFBMNDPNNJU5SBOTBDUJPO 
  14. Realm Java 0.88.0(ඇޓ׵ͳมߋ3) w 3FBMNNJHSBUF3FBMN ͕ର৅ͱ͢Δ3FBMNϑΝΠϧ͕ଘࡏ͠ͳ ͍৔߹ɺ'JMF/PU'PVOE&YDFQUJPOΛεϩʔ͠·͢ɻ w 3FBMN͔Βऔಘͨ͠0CTFSWBCMF͸ɺ಺෦ʹ3FBMNΠϯελϯε Λอ࣋͠ɺVOTVCTDSJCF͞ΕͨλΠϛϯάͰDMPTF

    ͠·͢ɻऔ ಘͨ͠0CTFSWBCMF͸๨ΕͣʹVOTVCTDSJCF͢ΔΑ͏ʹͯͩ͘͠ ͍͞ɻ 
  15. Observ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ͷϑΟʔϧυΛ΋ͯΔΑ͏ʹͳΓ ·ͨ͠ɻ   w 3FBMN3FTVMUTͷཁૉ਺͕*OUFHFS."9@7"-6&Ҏ্ͷ৔߹ɺTJ[F ϝιο υ͸ৗʹ*OUFHFS."9@7"-6&Λ͔͑͢Α͏ʹͳΓ·͢ɻ   w 3FBMN+BWBͷ""3ʹؚ·ΕΔϚχϑΣετϑΝΠϧ͔ΒBMMPX#BDLVQͷ هड़Λ࡟আ͠·ͨ͠ɻ  
  20. Realm Java 0.88.0(όάϑΟοΫε1) w VOJUUFTU&YBNQMFͷςετ͕ࣦഊ͢ΔόάΛमਖ਼ɻ   w +TPO&YBNQMFͰ+40/จࣈྻʹޡΓ͕͋ΔόάΛमਖ਼ɻ 

     w 3FBMN3FTVMUTEJTUJODU Λෳ਺ճݺͼग़ͨ͠ࡍʹ݁Ռ͕ෆਖ਼ʹ ͳΔόάΛमਖ਼ɻ   w %ZOBNJD3FBMN0CKFDUTFU-JTU ʹ3FBMN-JTUΛ౉ͤͳ͍όάΛ मਖ਼ɻ 
  21. Realm Java 0.88.0(όάϑΟοΫε2) w pOE'JSTU"TZOD ͷ݁Ռ͕݅ͷ৔߹ʹ3FBMN$IBOHF-JTUFOFST ͕ݺͼग़͞Εͳ͍όάΛमਖ਼ɻ͜Εʹ൐ͬͯɺಉ༷ͷঢ়گʹ͓͍ ͯpOE'JSTU"TZOD ͔Βऔಘͨ͠0CTFSWBCMFͷPO/FYU ΋ਖ਼͠

    ͘ݺ͹ΕΔΑ͏ʹͳΓ·͢ɻ   w ஋ʹOVMMΛηοτͨ͠৔߹ʹ3FBMN$IBOHF-JTUFOFS͕ݺ͹Εͳ ͍όάΛमਖ਼ɻ   w ಛఆͷঢ়گͰ#BE7FSTJPO&YDFQUJPO͕εϩʔ͞ΕΔόάΛमਖ਼ɻ 
  22. Realm Java 0.88.1(όάϑΟοΫε) w 3Y+BWBΛ࢖༻͠ͳ͍؀ڥͰɺ 3FBMN$POpHVSBUJPOFRVBMT 3FBMN$POpHVSBUJPO ͕/1&Λεϩʔ ͢ΔόάΛमਖ਼ 

     w ϞσϧΫϥεͰ3FBMNҎ֎ͷΞϊςʔγϣϯΛ࢖༻͍ͯ͠ΔͱϏϧ υʹࣦഊ͢ΔόάΛमਖ਼   w TPϑΝΠϧʹ40/".&ϔομʔΛ௥Ճɻ   w %ZOBNJD3FBMN0CKFDUUP4USJOH ͕OVMMͷ஋Λਖ਼͘͠දࣔ͠ͳ͍ό άΛमਖ਼ɻ   w 3F-JOLFSΛ3FBMNࣗମʹಉࠝ͢ΔΑ͏ʹ͠·ͨ͠ɻ 
  23. Better Objects! w ೚ҙͷϝιουΛ௥ՃͰ͖ΔΑ͏ʹͳΓ·͢ w ೚ҙͷΠϯλϑΣʔεΛ࣮૷͢Δ͜ͱ͕Ͱ͖·͢ w HFUUFSͱTFUUFSͷதʹɺࣗ༝ʹϩδοΫΛ૊ΈࠐΉ͜ͱ͕Ͱ͖·͢ w HFUUFSTFUUFSϝιουͷ໊લΛࣗ༝ʹܾΊΔ͜ͱ͕Ͱ͖·͢

    w ϑΟʔϧυΛQVCMJDʹ͢Δ͜ͱͰɺHFUUFSTFUUFSͳ͠ʹϑΟʔϧ υ΁ΞΫηε͢Δ͜ͱ͕Ͱ͖·͢ w ಠࣗͷUP4USJOH ɺFRVBMT ɺIBTI$PEF ϝιουΛఆٛ͢Δ͜ ͱ͕Ͱ͖·͢
  24. Better Objects DMBTT.PEFMFYUFOET3FBMN0CKFDUJNQMFNFOUT$PNQBSBCMF.PEFM\ QVCMJD4USJOHpSTU/BNF QVCMJD4USJOHMBTU/BNF QVCMJD4USJOHHFU'VMM/BNF \ SFUVSOpSTU/BNF  MBTU/BNF

    ^ QVCMJDJOUDPNQBSF5P 5BOPUIFS \ SFUVSO ^ QVCMJD4USJOHUP4USJOH \ SFUVSO ^ ^ .PEFMN SFBMNBMM0CKFDUT .PEFMDMBTT pSTU  NpSTU/BNF NMBTU/BNF NHFU'VMM/BNF 
  25. Happy coding with Better Objects

  26. http://bit.ly/RealmJP_13 ୹͍Ξϯέʔτʹ͝ڠྗ͍ͩ͘͞

  27. Where to find us • # Realm Japan User Group:

    facebook.com/groups/realmjp • # Twitter: twitter.com/realmJapan • GitHub: github.com/realm • # StackOverflow: ja.stackoverflow.com/questions/tagged/realm • # Email: help@realm.io • # Slack: slack.realm.io/
  28. Realm Japan User Group # facebook.com/groups/realmjp

  29. Public Realm Slack # slack.realm.io/

  30. Official Twitter/Facebook twitter.com/realmJapan facebook.com/655569387879379

  31. Official Web site realm.io/jp