Rails 5.1.0.beta1はどのようにモダンなJavaScript開発を実現しているのか?

52f95e52a6d71b67361ac179fb8405f4?s=47 chimame
February 28, 2017

Rails 5.1.0.beta1はどのようにモダンなJavaScript開発を実現しているのか?

Ruby Kansai #77

52f95e52a6d71b67361ac179fb8405f4?s=128

chimame

February 28, 2017
Tweet

Transcript

  1. 3BJMTCFUB͸ͲͷΑ͏ ʹϞμϯͳ+BWB4DSJQU։ൃΛ ࣮ݱ͍ͯ͠Δͷ͔ʁ  !SJUP

  2. ໨࣍ ࣗݾ঺հ શମ֓ཁਤ 3BJMTCFUBϦϦʔε ϑϩϯτΤϯυ։ൃ؀ڥ +BWB4DSJQUͷϏϧυํ๏ +BWB4DSJQUͷಡΈࠐΈํ๏ ·ͱΊ

  3. ࣗݾ঺հ /BNFSJUP 5XJUUFS!DIJNBNF@SU (JU)VC!DIJNBNF +PC
 XFCEFWFMPQFS
 ΫϦχοΫ޲͚਍࡯༧໿ड਍ऀ؅ཧαʔϏεΛߏங 5FDIOPMPHZ
 3VCZ 3VCZPO3BJMT

    +BWB4DSJQU 3FBDU 3FEVY  EPDLFS 'MVFOUE #JH2VFSZFUD
  4. શମ֓ཁਤ XFCQBDL XFCQBDLEFWTFSWFS XFCQBDLFSHFN ᶃϏϧυ+4Λऔಘ ᶃϏϧυ+4Λऔಘ ᶄϏϧυ+4Λ౉͢ ᶃ+4ϏϧυΛࢦࣔ ᶃ+4ϏϧυΛࢦࣔ ᶄϏϧυ+4Λੜ੒

    ᶄϏϧυ+4Λੜ੒ GSPOUFOE CBDLFOE
  5. 3BJMTCFUB ϦϦʔε

  6. ৮ͬͨਓ͍·͔͢ʁ

  7. Ϟμϯͳ+BWB4DSJQU։ൃ͕ Ͱ͖ΔΒ͍͠

  8. ͡Ό͋ɺ΍ͬͯΈΑ͏

  9. ҎԼͷίϚϯυ͓ΑͼઃఆͰ͖Δ  HFNJOTUBMM΋͘͠͸CVOEMFJOTUBMMͰ3BJMTCFUBΛΠϯετʔϧ͢Δɻ  SBJMTOFX͢Δ࣌ʹXFCQBDLΦϓγϣϯΛ͚ͭͯ࡞੒͢Δɻ  ZBSOΛΠϯετʔϧ͢Δɻ  CVOEMFFYFDSBJMTXFCQBDLFSJOTUBMMͰXFCQBDL༻ͷ+BWB4DSJQU؀ڥͷߏங͢Δɻ TLJQCVOEMFͰOFXͨ͠৔߹

      CVOEMFFYFDSBJMTXFCQBDLFSJOTUBMMSFBDUͰ3FBDUKTͷ؀ڥΛߏங͢Δɻ  (FNpMFʹGPSFNBOΛ௥Ճͯ͠ɺCVOEMFJOTUBMMʹͯΠϯετʔϧ͢Δɻ  ΞϓϦέʔγϣϯ3PPUʹCJOSBJMTTͱCJOXFCQBDLEFWTFSWFS ΋͘͠͸CJOXFCQBDLXBUDIFS ͷͭͷίϚϯ υΛهࡌͨ͠1SPDpMFΛ௥Ճ͢Δɻ  DPOpHFOWJSPONFOUTEFWFMPQNFOUSCͷDPOpHYXFCQBDLFS<EFW@TFSWFS@IPTU>IUUQMPDBMIPTUΛίϝ ϯτΠϯ͢Δɻ  CVOEMFFYFDSBJMTHTDB⒎PMETBNQMFͰTBNQMFͷDPOUSPMMFS΍WJFX౳Λ࡞੒͢Δɻ TBNQMFTͷJOEFYIUNMFSCʹKBWBTDSJQU@QBDL@UBHIFMMP@SFBDUͷهड़Λ௥Ճ͢Δɻ ඞཁͰ͋Ε͹CVOEMFFYFDSBJMTECNJHSBUFͰNJHSBUFΛ࣮ߦ͓ͯ͘͠ɻ CVOEMFFYFDGPSFNBOTͰ3BJMT͓ΑͼXFCQBDLEFWTFSWFSΛىಈͤ͞Δɻ ϒϥ΢βʹͯIUUQMPDBMIPTUTBNQMFTΛ։͘ͱ)FMMP3FBDUͱදࣔ͞Εɺ3FBDUKT͕ಈ͍͍ͯΔ͜ͱΛ֬ೝ͢ Δɻ
  10. ཁ఺͚ͩઆ໌͠·͢

  11. ϑϩϯτΤϯυͷ։ൃ؀ڥ

  12. CVOEMFFYFDSBJMTXFCQBDLFSJOTUBMMSFBDU ίϚϯυͰ࡞੒͞ΕΔ؀ڥ ☑SBJMTOFX࣌ʹXFCQBDLΛࢦఆ͢Δ ͱXFCQBDLFSͱ͍͏HFN͕ೖΔɻ ☑XFCQBDLFSͷHFOFSBUPS͸ैདྷͷ +BWB4DSJQU഑ஔ৔ॴͱ͸ҟͳΔ৔ॴ ʹ+BWB4DSJQUϑΝΠϧΛ഑ஔ͢Δɻ ☑ZBSO΍XFCQBDLͷίϚϯυΛεΫϦ ϓτʹ࣮ͯߦͰ͖Δɻ ☑XFCQBDLͷઃఆϑΝΠϧΛ഑ஔ͢Δ

    ৔ॴ͕৽ͨʹ࡞ΒΕΔɻ
  13. +BWB4DSJQUͷϏϧυํ๏

  14. +BWB4DSJQUͷ഑ஔ৔ॴ͕ҟͳΔ ˒ ࠓ·Ͱ͸zBQQBTTFUTKBWBTDSJQUTzɻ
 ࡞੒ͯ͠΋ͷ͸zBQQKBWBTDSJQUzɻ
 ˠBTTFUT؅ཧԼ͔Β֎ΕͯΔ ˒ ͳͷͰzBQQBTTFUTKBWBTDSJQUTBQQMJDBUJPOKTz Ͱ΋ಡΈࠐ·ͳ͍ɻ
 ˠͲ͏΍ͬͯCVJMEͯ͠Δͷʁ

  15. XFCQBDL

  16. Ϗϧυͷ࣮ߦํ๏Λͭఏڙ ˒ CJOXFCQBDLEFWTFSWFSˠEFWઐ༻ ˒ CJOXFCQBDL XBUDIFS ༧Ί3BJMTͰ࣮ߦ͢ΔεΫϦϓτΛछྨ༻ҙ͍ͯ͠Δ

  17. Ϗϧυ͢ΔϑΝΠϧͷಡΈࠐΈઃఆ FOUSZHMPCTZOD QBUIKPJO BQQ KBWBTDSJQU QBDLT  KT  SFEVDF

      NBQ FOUSZ \ DPOTUCBTFOBNFQBUICBTFOBNF FOUSZ FYUOBNF FOUSZ  DPOTUMPDBM.BQNBQ MPDBM.BQ<CBTFOBNF>QBUISFTPMWF FOUSZ  SFUVSOMPDBM.BQ ^ \^ \IFMMP@SFBDUlઈରύεIFMMP@SFBDUKTYz^ DPOpHXFCQBDLTIBSFEKTͷFOUSZ෦෼͕ͦΕʹ֘౰ ͢ΔɻσϑΥϧτͰ͸ϑΝΠϧ໊ΛΩʔʹɺύεΛ஋ ͱͯ͠࿈૝഑ྻΛઃఆ͍ͯ͠Δɻ
  18. CJOXFCQBDLEFWTFSWFSͰ ͷϏϧυ ⚙ 3BJMTαʔόͱ͸ผʹXFCQBDL༻ͷαʔ όʢXFCQBDLEFWTFSWFSʣ͕ىಈ͢ Δɻ ⚙ XFCQBDLEFWTFSWFS͸FOUSZϑΝΠ ϧΛϏϧυͯ͠+BWB4DSJUQϑΝΠϧΛ ฦ͢͜ͱ͕ՄೳͰ͢ɻ

    ͳͷͰIUUQMPDBMIPTUpMFOBNFKTͰ ϑΝΠϧʹΞΫηεͰ͖Δɻ
  19. CJOXFCQBDLͰͷϏϧυ ⚙DPOpHXFCQBDLTIBSFEKTʹ্ هͷPVUQVUઃఆ͕ͨΊɺQVCMJD ഑ԼʹϏϧυͨ͠+BWB4DSJQU ϑΝΠϧ͕ੜ੒͞ΕΔɻ PVUQVU\ pMFOBNFb<OBNF>KT  QBUIQBUISFTPMWF QVCMJD

    EJTU%JS  ^
  20. +BWB4DSJQUͷಡΈࠐΈํ๏

  21. BTTFUT഑Լ͡Όͳ͍ͷʹͲ͏΍ͬ ͯಡΈࠐΜͰΔͷʁ

  22. +BWB4DSJQUͷಡΈࠐΈ͸ҎԼ ͷهड़Λ7JFXʹ௥Ճ KBWBTDSJQU@QBDL@UBHIFMMP@SFBDU

  23. KBWBTDSJQU@QBDL@UBHͷιʔε SFRVJSFXFCQBDLFSTPVSDF NPEVMF8FCQBDLFS)FMQFS EFGKBWBTDSJQU@QBDL@UBH OBNF  PQUJPOT  KBWBTDSJQU@JODMVEF@UBH 

    8FCQBDLFS4PVSDFOFX OBNF QBUI   PQUJPOT   FOE FOE KBWBTDSJQU@JODMVEF@UBHΛݺΜͰΔ͚Ͳɺ QBUI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ಡΈࠐΈ ઃఆʹΑΓXFCQBDLEFWTFSWFS΋͘͠͸XFCQBDL ͔ΒͷϏϧυ+BWB4DSJUQΛಡΈࠐΜͰ͘ΕΔɻ

  28. શମ֓ཁਤ ͓͞Β͍ XFCQBDL XFCQBDLEFWTFSWFS XFCQBDLFSHFN ᶃϏϧυ+4Λऔಘ ᶃϏϧυ+4Λऔಘ ᶄϏϧυ+4Λ౉͢ ᶃ+4ϏϧυΛࢦࣔ ᶃ+4ϏϧυΛࢦࣔ

    ᶄϏϧυ+4Λੜ੒ ᶄϏϧυ+4Λੜ੒ GSPOUFOE CBDLFOE
  29. ·ͱΊ 3BJMTࣗମͰϞμϯͳ+BWB4DSJQU։ൃΛ࣮ݱͯ͠ ͍ΔͷͰ͸ͳ͍ɻ 8FCQBDLFSಋೖͰϞμϯͳ+BWB4DSJQU։ൃ؀ڥ ͱͷڮ౉͠Λ͍ͯ͠Δɻ