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

プロトタイプ編 Hatena Engineer Seminar #19

プロトタイプ編 Hatena Engineer Seminar #19

k-murakami0609

April 01, 2022
Tweet

More Decks by k-murakami0609

Other Decks in Programming

Transcript

  1. ηογϣϯͷ঺հ ΧΫϤϜͰ͸ Xslate + jQuery ͔Β React ʹҠߦ͢ΔϓϩδΣΫτΛਐΊ͍ͯ ·͢ɻ͜ΕΛਐΊΔʹ͋ͨͬͯɺݕ౼ॳظʹϓϩτλΠϓΛ࡞Δͱ͍͏બ୒ Λ͠·ͨ͠ɻ(Ұ೥΄Ͳલͷ࿩

    ) ͜ͷηογϣϯͰ͸ɺϓϩτλΠϓΛߦ͏ʹࢸͬͨܦҢ΍ૂ͍ɺ·ͨޙ൒Ͱ ͸શମͷਐΊํͳͲΛ঺հͰ͖ͨΒͱࢥ͍·͢ɻ ิ଍) Xslate͸ Perl ͷςϯϓϨʔτΤϯδϯ
  2. • Perl ୤ग़ΛਐΊͯߦ͖͍ͨ ◦ ͦͷ଍͕͔Γͱͯ͠ɺ·ͣϑϩϯτΤϯυͱόοΫΤϯυ ͷ෼཭Λߦ͍͍ͨͱ͍͏࿩ʹͳͬͨ • ຐ๏ͷiΒΜͲͱΞʔΩςΫνϟΛἧ͍͑ͨ • React

    ͷ΄͏͕ੜ࢈ੑ͕ѹ౗తʹߴ͍ ◦ ຐ๏ͷiΒΜͲͷܦݧ͔ΒɺΤϯδχΞɾσβΠφʔڞʹͦ ͏͍ͬͨ࿩ʹͳͬͨ ͳͥ React Ҡߦ͕બ͹Εͨͷ͔
  3. • ϓϩτλΠϓ͕ޮՌతͰ͸ͳ͍͔ͱࢥ͍ͬͯΔɻ ◦ ҠߦΛਐΊ͍ͯ͘தͰɺํ਑͕ؒҧ͍ͬͯͨ͜ͱ͕Θ͔Γ શ෦΍Γ௚͠ʹͳΔ ▪ -> ૣΊʹ஍ཕΛ౿ΜͰ͓͚Δ ◦ ։ൃ଎౓Λ্͛ΒΕͯͳ͍

    ▪ -> ϓϩτλΠϓΛ͖ͨͨ୆ͱ͢Δ͜ͱͰɺνʔϜϝϯ όʔͷҙݟΛฉ͍ͯόϥϯεײ֮Λ͔֬ΊΔ͜ͱ͕Ͱ͖ Δ ϦΞʔΩςΫνϟʹ͓͚Δࣦഊ΁ͷରԠํ๏
  4. ΍Γ͍ͨ͜ͱ΍ݱঢ়ͷ՝୊ΛϦετԽ͢Δ • ظؒ ◦ 3࣌ؒ • ΍ͬͨ͜ͱ ◦ ԿͰ΋͍͍ͷͰࢥͬͨ͜ͱΛՕ৚ॻ͖Ͱॻ͖ग़ͨ͠ ▪

    ຐ๏ͷiΒΜͲ͔Βվળ͍ͨ͜͠ͱ ▪ React Ҡߦ͢Δ্ͰωοΫʹͳΓͦ͏ͳ͜ͱ ▪ ؾʹͳ͍ͬͯΔٕज़తͳ୯ޠ • ྑ͔ͬͨ͜ͱ ◦ ͜Ε͔Βͷٞ࿦ͷ͖ͨͨ୆ʹͳͬͨ
  5. ΠϯηϓγϣϯσοΩͷ࡞੒ • ظؒ ◦ 2࣌ؒ • ΍ͬͨ͜ͱ ◦ ΠϯηϓγϣϯσοΩΛ࡞੒ͨ͠ •

    ྑ͔ͬͨ͜ͱ ◦ ࿩͠߹͍ͷ͖͔͚ͬʹͳͬͨ ◦ τϨʔυΦϑεϥΠμʔͷ͓͔͛ͰPOͱͷೝ͕ࣝἧͬͨ ◦ ༻ޠͷ੔ཧ͕ਐΜͩ
  6. • ظؒ ◦ 2िؒ * 2 • ΍ͬͨ͜ͱ ◦ 2ύλʔϯͷϓϩτλΠϓΛ࡞ͬͨ

    ▪ Next.js + GraphQL Λ࢖͏ύλʔϯ ▪ XslateͱReact͕ڞଘ͢Δύλʔϯ ◦ ݕ౼ࣄ߲ҰཡΛ͕࣌ؒڐ͢ݶΓ্͔Βࢼ͍ͯͬͨ͠ ϓϩτλΠϐϯά
  7. ํ਑ͷݻΊͱνʔϜʹ߹ҙΛͱΔ • ظؒ ◦ 1िؒ • ΍ͬͨ͜ͱ ◦ ͻͨ͢ΒADRΛॻ͍ͨ͜ͱ ◦

    શ෦ͷϖʔδʹల։׬ྃ·Ͱͷେࡶ೺ͳϩʔυϚοϓΛॻ ͍ͨ͜ͱ ◦ εςʔΫϗϧμʔΛશһूΊͯձΛ։͍ͨ
  8. • Next.js + GraphQL ʹ͢΂͖͔ɺXslateͱReact͕ڞଘ͢ΔΑ͏ʹ͢΂ ͖͔ • CSRΛ༗ޮʹ͢Δ͔ • ΩϟογϡͲ͏͢Δ͔

    • CSS͸ͲΜͳٕज़Λ࢖͏͔ • ਪ঑ϒϥ΢βϙϦγʔΛͲ͏͢Δ͔ • ReactԽલޙϖʔδͷϧʔςΟϯάͷํ๏΍੾Γସ͑ΛͲ͏࣮ݱ͢Δ͔ • WebViewͰදࣔ͞Ε͍ͯΔ΋ͷ͸Ͳ͏͢Δ͔ʁ • etc… ADRʹॻ͍ͨ͜ͱ
  9. ํ਑ͷݻΊͱνʔϜʹ߹ҙΛͱΔ • ྑ͔ͬͨ͜ͱ ◦ ADRΛॻ͍ͨ͜ͱ ▪ ϑΥʔϚοτ͕ॻ͖΍͔ͬͨ͢ ▪ ్தܦա͕ slack

    ʹྲྀΕ͍ͯͨͷͰɺձʹ޲͚ͯࢥߟΛঃʑ ʹ։ࣔͰ͖ͨ ▪ ్தͰϝϯόʔ͔Β൓Ԡ͕΋Β͑ΔͷͰɺυΩϡϝϯτͷ෼ ྔΛௐ੔Ͱ͖ͨ ◦ େࡶ೺ͳϩʔυϚοϓΛΈΜͳͰΈΔ͜ͱͰɺن໛ײΛڞ༗Ͱ͖ ͨΓɺ௚ۙͷ࿩ͳͷ͔ະདྷͷ࿩ͳͷ͔Λ੔ཧͰ͖ͨ
  10. • ظؒ ◦ 1೔ • ΍ͬͨ͜ͱ ◦ λεΫʹ෼ղͯ͠ϓϩδΣΫτ؅ཧπʔϧʹ഑ஔͨ͠ • ྑ͔ͬͨ͜ͱ

    ◦ ϓϩτλΠϓͰݕ౼ࣄ߲ҰཡΛ࡞͍ͬͯͨͨΊɺλεΫ෼ ղ͕༰қͩͬͨ ϑϩϯτج൫࣮૷ʹඞཁͳλεΫΛ෼ղͯ͠ɺεέδϡʔϧʹམͱ͢