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

フロントエンドのトレンド〜サーバーレスSPA、Jamstack〜

 フロントエンドのトレンド〜サーバーレスSPA、Jamstack〜

Developers Summit 2020 KANSAIの登壇資料です。

Kazuki Shibata

August 27, 2020
Tweet

More Decks by Kazuki Shibata

Other Decks in Technology

Transcript

  1. WebαΠτ WebΞϓϦέʔγϣϯ ϚʔέςΟϯάʢू٬ʣ αʔϏεʢՁ஋ʣͷఏڙ ໨త ໨త खஈ Ϣʔβʔͷཉ͍͠৘ใΛൃ৴͢Δ Ϣʔβʔͷ΍Γ͍ͨ͜ͱΛ࣮ݱ͢Δ खஈ

    ݕࡧΤϯδϯϑϨϯυϦʔͰ͋Δ ฤूऀ͕ίϯςϯπΛฤूͰ͖Δ ෳࡶͳػೳཁٻʹ଱͑ΒΕΔ ඞཁ৚݅ ඞཁ৚݅
  2. αʔόʔϨεSPAͱ͍͏બ୒ࢶ • SPA ͸ index.html ͱόϯυϧJS͑͋͞Ε͹ಈ͘ • αʔόʔαΠυͰߦ͏΂͖ॲཧ͸͢΂ͯ API Λհͯ͠


    Cloud Function ্Ͱߦ͏͜ͱͰɺαʔόʔϨεͳ SPA ͕࣮ݱͰ͖Δ • ExpressͳͲͷWebαʔόʔ͸ෆཁ
  3. αʔόʔϨεSPAߏ੒ྫʢAWS൛ʣ ϒϥ΢β CloudFront ʢCDNʣ S3 ʢStorageʣ Lambda ʢCloud Functionʣ HTML

    / JS / CSS / ը૾ औಘɺૹ৴ɺݕࡧ౳ Ωϟογϡ DynamoDB ʢDatabaseʣ CognitoʢIdentityʣ ೝ ূ σʔλ API Gateway JSON
  4. WebαΠτ WebΞϓϦέʔγϣϯ ϚʔέςΟϯάʢू٬ʣ αʔϏεʢՁ஋ʣͷఏڙ ໨త ໨త खஈ Ϣʔβʔͷཉ͍͠৘ใΛൃ৴͢Δ Ϣʔβʔͷ΍Γ͍ͨ͜ͱΛ࣮ݱ͢Δ खஈ

    ݕࡧΤϯδϯϑϨϯυϦʔͰ͋Δ ฤूऀ͕ίϯςϯπΛฤूͰ͖Δ ෳࡶͳػೳཁٻʹ଱͑ΒΕΔ ඞཁ৚݅ ඞཁ৚݅
  5. ੈքͷCMSγΣΞʢ2020೥8݄ʣ      8PSE1SFTT 4IPQJGZ +PPNMB %SVQBM

    8JY 4RVBSFTQBDF #JUSJY #MPHHFS .BHFOUP 0QFO$BSU ※ௐࠪର৅αΠτͷ͏ͪɺCMSΛಋೖ͍ͯ͠ΔαΠτ͕59.5% ※ग़యɿhttps://w3techs.com/technologies/overview/content_management 63.5
  6. ೔ຊͷCMSγΣΞʢ2020೥8݄ʣ      8PSE1SFTT "EPCF%SFBNXFBWFS &$$VCF ※ւ֎ʹΑΔ೔ຊͷௐࠪͳͷͰࢀߟఔ౓ʹ

    ※ग़యɿhttps://w3techs.com/technologies/segmentation/cl-ja-/content_management 83.1
  7. • HTMLΛࣄલʹੜ੒͢Δख๏ • Gatsby / Next / Nuxt ͷొ৔Ͱɺ
 React΍Vueͱ͍ͬͨߴੑೳͳ


    ϥΠϒϥϦΛWebαΠτ੍࡞ʹ΋
 ౤ೖͰ͖ΔΑ͏ʹͳͬͨ ✅ SEO໰୊ͳ͠ ✅ ࣮૷΋؆୯Ͱɺίεύྑ͠ SSGͷਐԽ
  8. ࣄલʹੜ੒͞ΕͨHTMLΛCDN͔Β഑৴͢Δ͜ͱͰɺߴ଎Ͱ
 ηΩϡΞͳαΠτΛ࣮ݱ͠·͢ɻ
 ΢Σϒαʔόʔͷ؅ཧ΍࣮ߦ͸ඞཁ͋Γ·ͤΜɻ Fast and secure sites and apps delivered

    by pre-rendering files and serving them directly from a CDN, removing the requirement to manage or run web servers. https://jamstack.org/
  9. Jamstackͱ͸ • Netlify CEOͷMatt Biilmannࢯ͕ఏএͨ͠ݴ༿ • SSG + CSRͷϋΠϒϦου •

    ॳظϖʔδ͸ࣄલϏϧυͨ͠੩తϑΝΠϧΛϩʔυ͠ɺϖʔδભҠ࣌ ͸CSRΛߦ͏ • ϝσΟΞͳͲɺ੩తίϯςϯπͷଟ͍αΠτʹ޲͍͍ͯΔ
  10. Next.js ͷ Incremental Static Regeneration • SSR / SSG /

    CSR ͷϋΠϒϦου • ॳճΞΫηε࣌͸SSR • ୭͔͕Ұ౓Ͱ΋ΞΫηε͢Ε͹ɺͦͷλΠϛϯάͰSSG͕͞ΕΔ • ϖʔδભҠ࣌͸CSR • TwitterͷσϞ https://static-tweet.now.sh/