ã¿ããªã®PHP ç¾å ´ã§å½¹ç«ã¤ææ°ãã¦ãã¦!
- ä½è :ç³ç° çµ¢ä¸(uzulla),ç³å±± å®å¹¸,é è¤ å¤ªå¾³,å¤§æ© ä½å¤ª,å²¡ç° æ£å¹³,å·å ç¿å¾,æ¨æ ä¿å½¦,å°å±± å²å¿,é«æ© é¦å½¦,竹澤 æè²´,å¯æ 亮,é·è°·å· æºå¸,æ±å£ åæ,ãããã¼,å±±æ¬ ããªã³,åç° ç¥å¹³,è¥è ç« ,渡辺 ä¸å®
- åºç社/ã¡ã¼ã«ã¼: æè¡è©è«ç¤¾
- çºå£²æ¥: 2019/12/06
- ã¡ãã£ã¢: åè¡æ¬ï¼ã½ããã«ãã¼ï¼
PHPã¯èªåã®ã¡ã¤ã³è¨èªãªã®ã§åºæ¬çã«ã¯ããã話ã大é¨åã§ããã ããããã ããããã®å¾©ç¿ããããæ°ããçºè¦ããããèªãã§ããã£ãã§ãã
ãã®ä¸ããåºãã£ãè¨äºãï¼ã¤æ¸ãã¦ããã¾ãã
6.4 MBCã ãã«çã¾ããªãããã®è¨è¨ã®è©±
ADRï¼Action-Domain-Reponderï¼
Action-Domain ã®é¨åã¯åãããã«Laravelã§è¿ãæ§æã§ã®æ¸ãæ¹ã¯ããããã¨ãããã¾ããã
MVCããADRã«å¤æ´ããæ³ã®å
·ä½çãªå¤æ´ç¹ãããããããã®ãè¯ãã£ãã§ãã
èªåçæããã Controller ã®ã¾ã¾CRUDå¦çãæ¸ãå§ãã¦ãã¾ãã¨ãã©ããã¦ãFat-Controllerã«ãªããã¡ã§ãã
Controllerã® 1 public ã¡ã½ããã Action ã¨ãã形㧠1ã¯ã©ã¹ã«åå²ãã¦ããæ¹å¼ã¯ç§ãæ°ã«å
¥ã£ã¦ãã¾ãã
Responderã¨ããã®ã¯åãã¦åºä¼ã£ã¦ããªãã»ã©ãªã¨æãã¾ããã
ã¬ã¹ãã³ã¹ãçæããã¨ããã¾ã§ããã¸ãã¹ãã¸ãã¯ã¨ãã¦è¨è¿°ãããã¨ãå¤ãã£ãã®ã§ãããããã¯Responderã®å½¹å²ã ã£ãã®ãããããªãã¨æãã¾ããã
ãã¼ã¿ã®CRUDå¦çããã¦ã¬ã¹ãã³ã¹ã®ãã¨ã¨ãªããã¼ã¿ãåå¾ããã¨ããã¾ã§ããã¡ã¤ã³å±¤ã«æ¸ããã¬ã¹ãã³ã¹ï¼å¤§åãviewã§ã¯ãªãAPIãªã®ã§é
åãã´ãã§ã´ãã§ããã®ã¿ï¼ã®å å·¥ã¯Responder ã¨å½¹å²ãåããã¨è¯ãããã§ããã
5.3 AWS CodePipeline ã使ç¨ããCI/CD ç°å¢ã®å°å ¥
ãã¡ãã¯PHPã§ã¯ãªããPHPããããã¤ããAWSã®ç°å¢æ§ç¯ã«ã¤ãã¦è§¦ãããã¦ãã¾ããã
AWSã§CodePipelineãCodeBuildã¯ãã§ã«ããã¤ãã®æ¡ä»¶ã§ä½¿ã£ã¦ãã¾ãã
CDKã¨ãããã®ã使ãã¨ãTypeScriptã使ã£ã¦ã¨ã³ã¸ãã¢ã«ãããããããç°å¢æ§ç¯å
容ãè¨è¿°ã§ãã
ã¨ããæ¦è¦ã¾ã§ã¯ãã£ãããã¦ãããã®ã®ãå®éã«æãåããã¦ä½ã£ã¦ã¿ããã¨ãããã¾ããã§ããã
æ¬æ¸ã§ç´¹ä»ããã¦ãããµã³ãã«ã³ã¼ãã®typoãè¦ã¤ãã¦å ±åãã¦ãã¾ããããã«ã¯ãã£ããã³ã¼ãã¾ã§èªã¿ã¾ããã
ãï¼typoã§ããâ¦ð¨
— ãããªã¹ (@kaz_29) 2020å¹´2æ12æ¥
åãã«ã¯é¢ä¿ãªããã©å¾ã»ã©ç´ãã¦ããã¾ãï¼
è¿ã ãAWSã使ã£ã¦ä½ããããã®ãããã®ã§ãCDKã使ã£ãç°å¢æ§ç¯ã¯æ©é試ãã¦ã¿ã¾ãã
ãããã«
çºå£²ç´å¾ã«è³¼å ¥ãã¦ãããã®ã®ããªããªãèªã¿å§ãããã2æã«å ¥ã£ã¦ããããããèªããã¨ãã§ãã¾ããã PHPerKaigiã®éå¬åã«èªãã§ãèè ã®æ¹ã ã«ãèªã¿ã¾ããï¼ãã£ã¦è¨ãããè¯ãã£ãã®ã«ãã¨ããã®ãä»åã®åçåºã§ãã æ®å¿µãªãããPHPerKaigiã«åå ãã復路ã®æéã§å¤§åãèªã¿çµãã¾ããã
移åæéãå©ç¨ã㦠#ã¿ããªã®PHP ãèªã¿çµãããã¢ã¦ããããã¯å®¶ã«å¸°ã£ã¦ããæ¸ããPHPerKaigi åå åã«èªãã§ããã°ããã£ãã¨æã£ãã®ã¯è¨ãã¾ã§ããªããã
— ãã (@makies) 2020å¹´2æ12æ¥
ãããããã¨ãç¹°ãè¿ããªãããã«ããã§ããéãç©ãèªãå¢ããéããªãããã«ããã¤éããã«ã¢ã¦ãããããããã¨ãç¶ãã¦ãããã¨æãã¾ãã
æå¾ã®æå¾ã«æºæ
æ¬å½ã®ã¨ãããããã¤ãã®è¨äºã¯ä»ã®èªåã«ã¯é£ãããã¦èªããªãã£ãã¨ããããããã¾ããã
ãã¤ã®æ¥ããèªåããã¯ã¼ã¢ãããã¦ç解ã§ããããã«ãªã£ãã¨ãã«ãããä¸åº¦èªã¿è¿ãããã§ãã