æ¬è¨äºã¯ NRIãããã³ã Advent Calendar 2021 22æ¥ç®ã®è¨äºã§ãã
ð 21æ¥ç® â¶â¶ æ¬è¨äº â¶â¶ 23æ¥ç® ð°
ã¯ããã¾ãã¦ãããã³ãã¨ã³ãã¨ã³ã¸ãã¢ã®ç§ã¨ç³ãã¾ãã
ä»åèªç¤¾ãµã¤ãã®ãªãã¥ã¼ã¢ã«ãJamstackæ§æã§è¡ã£ãã®ã§ãJamstackã¨ããã§æ¡ç¨ãããµã¼ãã¹ã«ã¤ãã¦æ¸ãã¦ããã¾ãã
- ãªãã¥ã¼ã¢ã«ã®æ¦è¦ã«ã¤ãã¦
- Jamstackã¨ã¯
- ä»åã®æ¡ç¨ãµã¼ãã¹ã¨æ¡ç¨çç±
- æå¾ã«
ãªãã¥ã¼ã¢ã«ã®æ¦è¦ã«ã¤ãã¦
ãªãã¥ã¼ã¢ã«ã®èæ¯ãã³ã³ã»ããã«ã¤ãã¦ã¯å¥è¨äºã«ã¦è¨è¼ãã¦ããã¾ãã®ã§ããã¡ããåããã¦ã覧ããã ããã°ã¨æãã¾ãã
Jamstackã¨ã¯
Jamstackã¯ãJavaScriptãAPIãMarkupã®é æåãã¨ã£ãç¥èªã§ããããããã®æè¡ãçµã¿åãããWebéçºã¢ã¼ããã¯ãã£ã«ãªãã¾ãã
ãããã¬ã¹CMSçã§äºåã«ç»é²æ¸ã¿ã®ãã¼ã¿ãAPIã§åå¾ããçæããéçHTMLãCDNã§é ä¿¡ããå½¢ãã¨ããã¨ã§ãWebãµã¼ãã¼ãæé¤ãããµã¼ãã¼ã®ç®¡çãéç¨ã®ã³ã¹ããåæ¸ãããã¨ãã§ãã¾ãã
ä¸è¨ã®ããããã¬ã¹CMSçã§äºåã«ç»é²æ¸ã¿ã®ãã¼ã¿ãAPIã§åå¾ããçæããéçHTMLãCDNã§é ä¿¡ããå½¢ãã¨ããã¨ã§ãã ãã ã¨å°ãåããã«ããã®ã§ãJamstackã§ã³ã³ãã³ãã®ç»é²ãããã©ã¦ã¶ã«ãã¼ã¸ã表示ãããã¾ã§ã®æµãã§è¦ã¦ã¿ã¾ãããã
- ãããã¬ã¹CMSçã§ã³ã³ãã³ãã®ç»é²ãè¡ã
- ãã«ãæã«APIã§ã³ã³ãã³ããåå¾ãã
- åå¾ããã³ã³ãã³ãããã¨ã«ãã¼ã¸ãçæ
- çæãããã¼ã¸ãã¹ãã¬ã¼ã¸ã«é ç½®
- ã¦ã¼ã¶ã¼ãã¹ãã¬ã¼ã¸ã«é ç½®ããããã¼ã¸ã«ã¢ã¯ã»ã¹ãã
- ãã©ã¦ã¶ã«ãã¼ã¸è¿å´ããããã©ã¦ã¶ã«è¡¨ç¤ºããã
ããã¾ã§ã®Webãµã¤ãã§æ¡ç¨ããã¦ãããã¦ã¼ã¶ã¼ãã¢ã¯ã»ã¹ããéã«Webãµã¼ãã¼å ã§ãã¼ã¸ãæ§ç¯ããæ¹å¼(Server Side Rendering)ãããã¼ã¸ããã©ã¦ã¶ã«è¿å´ãããéã«Webãµã¼ãã¼ããã³ã³ãã³ããåå¾ãã¦çæãè¡ãæ¹å¼(Client Side Rendering)ã¨ç°ãªããäºåã«ãã«ãããéçHTMLãé ç½®ãã¦ãããããã表示ããã ãã®æ¹å¼(CSR with Prerendering)ãã¨ã£ã¦ãã¾ãã
ãããã£ã¦ãã¦ã¼ã¶ã¼ãé²è¦§ããéã«Webãµã¼ãã¼ãä»ããå¿ è¦ããªãããWebãµã¼ãã¼ãæé¤ãããµã¼ãã¼ã®ç®¡çãéç¨ã®ã³ã¹ããåæ¸ãã«ç¹ãããã¨ãã§ããããã«ãªãã¾ãã
ã¾ããWebãµã¼ãã¼èªä½ãé²è¦§è ããè¦ããªãç¶æ ã«ãªãã®ã§ãã»ãã¥ãªãã£ãªã¹ã¯ãä½ããããã¨ãã§ãã¾ãã
ããã§ã¯ãããããã¯ä»åã®ãªãã¥ã¼ã¢ã«ã§æ¡ç¨ãããµã¼ãã¹ã¨æ¡ç¨çç±ã«ã¤ãã¦ãç´¹ä»ãã¾ãã
ä»åã®æ¡ç¨ãµã¼ãã¹ã¨æ¡ç¨çç±
microCMSï¼ãããã¬ã¹CMSï¼
- APIãã¼ã¹ã§åºåãããæ¥æ¬è£½ã®ãããã¬ã¹CMS
- äºç´å ¬éããã¬ãã¥ã¼æ©è½ããããGUIã®ç®¡çç»é¢ããã¯ç´æçãªå ¥ç¨¿ãå¯è½
- Next.jsãGatsbyãªã©æ§ã ãªè¨èªã»ãã¬ã¼ã ã¯ã¼ã¯ã¨é£æºå¯è½
Gatsbyï¼éçãµã¤ãã¸ã§ãã¬ã¼ã¿ã¼ï¼
- Reactãã¼ã¹ã®éçãµã¤ãã¸ã§ãã¬ã¼ã¿ã¼
- GraphQLãã¤ã³ã¿ã¼ãã§ã¼ã¹ã«ç¨ãããã¨ã§ãã³ã³ãã³ãã®åå¾å¦çãæ軽ã«å®è£ ã§ãã
- ãã©ã°ã¤ã³ãå å®ãã¦ããããã¦ã³ãã¼ããã¦è¨å®ãå°ãæ¸ãå ããã ãã§ããã«å©ç¨ãããã¨ãã§ãã
Netlifyï¼CDN/ADNï¼
- éçãµã¤ããã¹ãã£ã³ã°ãµã¼ãã¹
- å¤é¨ã®ãªãã¸ããªã¨é£æºããä»»æã®ã¿ã¤ãã³ã°ã§ãã«ãããããã¤ãå¯è½
- è¨å®ãGUIã®ç®¡çç»é¢ããç°¡åã«ã§ããSSLã®è¨å®ãå¯è½
ããã¦ããããã®ãµã¼ãã¹ãå ç¨ã®ãJamstackã§ã³ã³ãã³ãã®ç»é²ãããã©ã¦ã¶ã«ãã¼ã¸ã表示ãããã¾ã§ã®æµããã«å½ã¦ã¯ããã¨ãã¡ãã®ããã«ãªãã¾ãã
ãµã¼ãã¹ãå½ã¦ã¯ãã¦ã¿ãã¨ãæ å½ç¯å²ãæ確ã«åå²ããã¦ãããã¨ãããã¤ã¦ã®Webãµã¼ãã¼ä¸å¿ã®è¨è¨ãããã¤ã¯ããµã¼ãã¹åããã¦ãããã¨ããããããã¾ãããã®ãã¨ããåãµã¼ãã¹ã®ç¯å²ã«çµã£ãéçºãã¡ã³ããã³ã¹ãã§ããã®ã§ãä»å¾ã®éç¨ã«ã¤ãã¦ãããç¨åº¦ã³ã¹ãåæ¸ãè¦è¾¼ã¾ããã¨æãã¾ãã
æ¬ç« ã®çµã³ã¨ãã¦åãµã¼ãã¹ãå®éã«ä½¿ã£ã¦ã¿ãææãæ¸ãã¦ããã¾ãã
åãµã¼ãã¹ã使ã£ã¦ã¿ãææ
microCMS
microCMSã®ããã°å ã§ãã¬ã¼ã ã¯ã¼ã¯ã¨çµã¿åãããå®è£ ç´¹ä»ããããé常ã«åèã«ããããã¦å©ããã¾ãããç°¡åã«ã¹ãã¼ããè¨å®ã§ããã®ã§ãå ¥åºåã®ã¤ã¡ã¼ã¸ãã¤ãããããéçºé¢ã§ãåãããããã¦è¯ãã£ãã§ããã¾ãã管çç»é¢ããã¯éçºãã¼ããããã確èªã§ããããããã®ã¢ãããã¼ãã«ããªãæå¾ ãã¦ãã¾ãã
Gatsby
å人çã«ãã1å¹´éã»ã©Reactã使ãæ¡ä»¶ãå¤ãã£ãã®ã§ãå¦ç¿ã³ã¹ããå°ãªãæ¸ãã å°è±¡ãããã¾ãããµã¼ãã¹ã®æ¡ç¨çç±ã§ãæ¸ãã¾ãããããã¯ããã©ã°ã¤ã³ãå å®ãã¦ãããç»åã®webpã¸ã®å¤æãæ¬ããã°ã®feedåå¾çãç°¡åã«ã§ãã¾ãããã¾ããä»åã¯SCSSã§ã¹ã¿ã¤ãªã³ã°ãè¡ãã¾ããããCSS-in-JSãCSS modulesã対å¿ãã¦ããã®ã§ãã®ãã¡å¤æ´ãã¦ã¿ããã¨æãã¾ãã
Netlify
éçãµã¤ãã®å ¬éã ãã§ããã°ããã¯ããªãã¸ããªã¨Netlifyã ãããã°è¯ãã®ã§ã¯ãªããã¨æãããããç°¡åã§ããããã«ãæéã®å¶éãããã¾ãããæ¯æ¥é »ç¹ã«ãªãªã¼ã¹ãããã¨ããããã§ã¯ãªããã°ãããªã使ãæããããµã¼ãã¹ã ã¨æãã¾ããã
æå¾ã«
ä»åã¯ãJamstackæ§æï¼microCMS à Gatsby à Netlifyï¼ã§èªç¤¾ãµã¤ãããã«ãªãã¥ã¼ã¢ã«ãã話ã¨ãã¦ãJamstackã«ã¤ãã¦ã¨åæ¡ç¨ãµã¼ãã¹ã«ã¤ãã¦æ¸ãã¦ã¿ã¾ããã
èªåä¸äººã§ãµã¼ãã¹é¸å®ãè¡ã£ãããã§ã¯ãªãã§ãããåãµã¼ãã¹ããç´æçãããæ軽ãããç°¡åãã§ãããã¨ã¯ä»å¾ã®éç¨ã§éã¨ã³ã¸ãã¢ã§ãã¡ã³ããã³ã¹ãããããªããã¨ã«ç¹ããã®ã§ãããªãéè¦è¦ãã¦ãããã¨æãã¾ãã
ã¾ããä»åã¯èªç¤¾ãµã¤ãã®ãªãã¥ã¼ã¢ã«ã§ããããJamstackæ§æã®åãµã¼ãã¹ã¯è¦ä»¶ã«ãã£ã¦æè»ã«å¤æ´å¯è½ã§ãããé¸æè¢ãå¤ããã¨ãããä»å¾ã客ãã¾ã®æ¡ä»¶çã§æ¡ç¨ãã¦ä»åã®çµé¨ãéå ã§ããã¨å¬ããã§ãã
NRIãããã³ã Advent Calendar 2021
ð 21æ¥ç® â¶â¶ æ¬è¨äº â¶â¶ 23æ¥ç® ð°