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

Perfect Ruby on Rails v2

Perfect Ruby on Rails v2

パーフェクトRuby on Rails【増補改訂版】が発売したので少し裏話をお伝えします

sugamasao

July 25, 2020
Tweet

More Decks by sugamasao

Other Decks in Technology

Transcript

  1. ൃചͰ͖ͯΑ͔ͬͨ Kaigi on Rails new(2020/7/25) sugamasao sugamasao@gmail.com

  2. ͩΕʁ HN:sugamasao PN:͕͢ΘΒ ·͞ͷΓ Rubyྺ : 14೥͘Β͍ Railsྺ : 10೥͘Β͍

    • WebΞϓϦέʔγϣϯϓϩάϥϚʔ • Rubyʹؔ͢Δॻ੶ͷࣥච׆ಈ
  3. ࣥචྺ 2013 2019 2014 2018 2017 2020

  4. ࣥචྺ 2013 2019 2014 2018 2017 2020 ࠓ೔ͷ࿩

  5. ͓Αͦ6೥ӽ͠ʹ ύʔϑΣΫτRuby on Railsͱ͍͏ॻ੶ ΛվగͰ͖ͨͱ͍͏ ͓࿩Λ͠·͢

  6. ΑΖ͘͠ ͓Ͷ͕͍͠·͢

  7. ڞஶ ϝϯόʔ

  8. ୭1ਓ͚ܽͯ΋ ग़൛·Ͱ౸ୡͰ ͖ͳ͔ͬͨ ʢͷͰɺຊ౰ʹײँ͔͠ͳ͍ʣ

  9. ౸ୡͰ͖ͳ͔ͬͨϩά ॳ൛࣌୅ͷίϛοτ

  10. ౸ୡͰ͖ͳ͔ͬͨϩά Ұॠͷ΍Δؾ

  11. ౸ୡͰ͖ͳ͔ͬͨϩά ͍Α͍Αຊ౰ʹ΍Δ͔͠ͳ͘ͳͬͨ࣌

  12. ౸ୡͰ͖ͳ͔ͬͨϩά ͜͜ͰҰମͳʹ͕ىͬͨ͜ͷ͔? ͦͷṖΛղ͖໌͔͢΂͘զʑ͸ΞϚκϯͷԞ஍΁ͱ޲͔ͬͨ

  13. 2017/09ʙ2018/02 վగΛ΍Γ࢝Ί͕ͨ๞͖(ry

  14. 2018/02ʙ2018/10 ແ෩

  15. 2018/02ʙ2018/10 ʢແ෩ͳঢ়ଶʹରͯ͠ʣ ୲౰ฤूऀࢯ ʮύʔϑΣΫτRuby on Railsͷ४උӡಈ ͱͯ͠1࡭ϜοΫຊΛग़͠·͠ΐ͏͔ʂʯ ʮ͑ͬʯʮ͑ͬʯ

  16. 2018/11ʙ2019/10

  17. 2018/11ʙ2019/10 https://twitter.com/igaiga555/status/1186457440612544513 ग़ɺग़ʙωλόϨΣʙ

  18. ४උӡಈͯ͠·ͨ͠

  19. ύRailsվగʹ๋͛ͨओͳ೥݄ 1೥9ϲ݄͘Β͍΍ͬͯͨͬΆ͍

  20. ύRailsվగʹ๋͛ͨओͳ೥݄ @igaiga555͞Μ @_yasaichi͞Μ ͕ࢀըͯ͘͠Εͨ࣌ظ

  21. ύRailsվగʹ๋͛ͨओͳ೥݄ @igaiga555͞Μ @_yasaichi͞Μ ͕ࢀըͯ͘͠Εͨ࣌ظ Ͳ͏ݟͯ΋౔ஃ৔Ͱ͢ɻຊ౰ʹ ͋Γ͕ͱ͏͍͟͝·ͨ͠ ʢຊ౰ʹʂʣ

  22. ͦΜͳײ͡ͰͰ͖ͨͷ͕ ύʔϑΣΫτRuby on Railsʲ૿ิվగ൛ʳ Ͱ͢

  23. Part1ɹRails ʙ overview 1ষɹRuby on Railsͷ֓ཁ 2ষɹRuby on RailsͱMVC 3ষɹԡ͓͖͍͑ͯͨ͞Railsͷجຊػೳ

    ͬ͘͟Γݟॴ • جຊతͳRailsͷ࢖͍ํʹ͍ͭͯɺςΩετͷϒϥο γϡΞοϓ΍ղઆ಺༰ͷΞοϓσʔτ • 3ষͰ͸ओʹ `rails` ίϚϯυͰར༻Ͱ͖ΔίϚϯυ܈ ͔ΒݟΔػೳͷ঺հʢྫ͑͹credentialsͳͲʣ
  24. Part2ɹRailsͷपล஌ࣝ 4ষɹϑϩϯτΤϯυͷ։ൃख๏ 5ষɹRailsඪ४ͷػೳΛ׆༻ͯ͠ૉૣ͘ػೳ࣮૷͢Δ ͬ͘͟Γݟॴ • 4ষͰ͸Webpacker/Sprockets(CSS޲͚)΍ΈΜͳେ ޷͖stimulusͷղઆͳͲΛ͍ͯ͠ΔΑ • 5ষͰ͸ActiveStorageͳͲɺRails͕ఏڙ͍ͯ͠Δศ རίϯϙʔωϯτͷղઆΛ͍ͯ͠ΔΑ

  25. Part3ɹWebΞϓϦέʔγϣϯ։ൃ 6ষɹRailsΞϓϦέʔγϣϯ։ൃ 7ষɹRailsΞϓϦέʔγϣϯͷςετ ͬ͘͟Γݟॴ • ॳ൛Ͱ΋࡞੒ͨ͠AwesomeEventsΛݱ୅༻ʹϦϝΠΫ͠ ͍ͯΔΑ • ςετ͸minitestʹม͑·ͨ͠ •

    ίʔυ͸Web্ʹ͋Γɺষ୯ҐͰλάͳͲଧͬͯ͋Δͱ͍ ͏ҒۀΛୡ੒͍ͯ͠·͢ • https://github.com/perfect-ruby-on-rails/awesome_events
  26. Part4ɹRailsΞϓϦέʔγϣϯͷ֦ுɾӡ༻ 8ষɹRailsΞϓϦέʔγϣϯ֦ு 9ষɹίʔυ඼࣭Λ্͛Δ 10ষɹίϯςφΛར༻ͨ͠RailsΞϓϦέʔγϣϯͷӡ༻ ͬ͘͟Γݟॴ • CI΍gemͷΞοϓσʔτͳͲɺݱ୅ͷWebΞϓϦέʔγϣ ϯͰඞཁͳ׆ಈʹ͍ͭͯղઆ͍ͯ͠ΔΑ • ୯ʹRailsΛDockerͰಈ͔͢ɺͰ͸ͳ͘Ωϟογϡͷར༻ํ

    ๏ͳͲݱ࣮Λݟਾ͑ͨίϯςφӡ༻ํ๏ͳͲͷղઆΛͯ͠ ͍ΔΑ
  27. Part5ɹΤΩεύʔτRails 11ষɹෳࡶͳυϝΠϯΛදݱ͢Δ 12ষɹෳࡶͳϢʔεέʔεΛ࣮ݱ͢Δ 13ষɹෳࡶͳσʔλૢ࡞Λ࣮૷͢Δ ͬ͘͟Γݟॴ • Ͳͷষ΋ʮී௨ʹRailsΛ։ൃ͍ͯ͠ΔͱΩπ͘ͳͬͯ͘ Δʯ࣌ͷͲͷΑ͏ʹίʔυΛղ͖΄͙͍ͯ͘͠ͱྑ͍͔ղ આ͍ͯ͠ΔΑ

  28. ύRails/ύʔϑΣΫτRails ͳͲͱఴ͑ͯײ૝ΛπΠʔ τ͍͚ͯͨͩ͠Δͱஶऀ͕ͨͪتͼ·͢ʂ☺ ·ͨɺޡࣈ୤ࣈͳͲΛൃݟͨ͠ࡍ͸gihyo͞Μͷα ϙʔτϖʔδ͔ɺஶऀͬΆ͍ਓʹڭ͑ͯ΋Β͑Δͱॿ ͔Γ·͢ ࠷ޙʹ