JavaScript
ä»åã®ãé¡ Bun.js v1.0.12æç¹ã§åºæ¥ãªãã£ãä¸é¨æ©è½ã«ã¤ãã¦ãBun.jsã®ææ°çã§ã¯ã©ããªã£ãã...ã®æ¤è¨¼è¨äº ã¯ããã«ï¼å®£ä¼ ãããªã宣ä¼ã«ãªã£ã¦ãã¾ãã®ã§ãããæ¬æ¥ï¼2024/05/19(é)ï¼çºå£²ã®ãSoftware Design 2024å¹´6æå·ãèªã«ããã¦ãã第2ç¹éï¼â¦
ã¯ããã« ä»åã¯ãããã°ã©ãã³ã°è¨èªã®ãããããFalsyãªå¤ãã«ã¤ãã¦ãJavaScriptã¨MySQLã«ãããæ±ã&注æç¹ã«ã¤ãã¦ã§ãã åæï¼ãFalsyãªå¤ãã£ã¦ï¼ Falsyãªå¤ã¨ã¯ãä¸è¨ã®ãããªå¤ãæãã¾ãã 空æå 0 false null undefined 表ç¾ãé£ããã®ã§ãããâ¦
æ¬é¡ JavaScriptã®ä»æ§ã§ããECMAScript(=ES)ã«ã¤ãã¦ãããããææ°çã®ES2022ãæ¿èªããããã¨ããã®ãICSããã®ããã°(ãåèãµã¤ããåç §)ã§ç¥ãã¾ããã ãªã®ã§ä»åã¯ãES2022ã§æ£å¼æ¡ç¨ãããæ©è½ã«ã¤ãã¦ãã³ã¼ãä¾ãæãã¦èª¬æãããã¨æãã¾ãã ãªâ¦
ã¯ããã« ååã¾ã§ãGit管çããã¼ã¸ã§ãã³ã°ã«ã¤ãã¦è¨äºã«ãã¾ããããä»åã¯ä¸è»¢ãã¦ã¿ããªå¤§å¥½ãï¼JavaScriptã®è©±ã§ãã æè¿ã¡ãã£ã¨SNSã§è©±é¡ã«ãªã£ã¦ããJavaScriptã®æ°å¤ã«é¢ããè¬ï¼æåã«ã¤ãã¦ã§ãã ã¢ã¸ã§ã³ã parseInt()ã®æå ã+ãã-ãã«é¢â¦
ã¯ããã« ä»åãVue.jsãã¿ãã(æ¬å½ã¯ãã£ã¨AWSãServerless Frameworkãªã©ããã¯ã¨ã³ãçãªãã¿ãæ¸ããããã¦ãä»äºã§ãããããã...) æè¿ãããã³ãå´ã触ãæ©ä¼ãããã®ã§ãããã³ã³ãã¼ãã³ããã¼ã¹ã§ã®éçº(ãããããã³ã³ãã¼ãã³ãé§åéçº(CDD)â¦
â» 2021/12/10 19:00 ä¸é¨å 容ãè¨æ£ãã¾ãã ã¯ããã« ååã«ç¶ããä»åãVue.jsãã¿ãã é åãªã©ã®å¤ã<template>å ã§è¡¨ç¤ºããå ´åãv-forãªã©ã®ã«ã¼ããç¨ãããã¨ã¯å¤ãã¨æãã¾ãã ããã¦ãã®éãé åã®ãã¼ã¨ãªãå¤(âkey)ãéè¤ãã¦ããå¤ãããã¨ãduplicated </template>â¦
ã¯ããã« å æ¥(2021/6/28)ããNodeå¦å 36æéç® ãªã³ã©ã¤ã³ãã¨ããã¤ãã³ãã§ãNode16ã®æ°æ©è½ã®ç´¹ä»ãã¨ããå 容ã§çºè¡¨ããã¦é ãã¾ããã(è¦è´ï¼ãªã¢ã¯ã·ã§ã³ãã ãã£ãæ¹ã ããããã¨ããããã¾ãã) nodejs.connpass.com ãã®ä¸ã®çºè¡¨è³æã§Sleepæ©è½(â¦
ã¯ããã« 2021å¹´4æã«ãNode.jsã®version10ããµãã¼ãçµäºã¨ãªããAWSããããLambdaã®ãã¼ã¸ã§ã³ãæ´æ°ãã¦ãã ãããã¨ããæ¡å ãæ¥ã¦ã¾ããã ããã¦ãããã¨åãã¿ã¤ãã³ã°ã§version16ããªãªã¼ã¹ããã¾ããã ä»å¹´ã®10æã«ã¹ãã¼ã¿ã¹ãActiveã«ãªãã¾ãâ¦
ã¯ããã« ã¤ãå æ¥(2/3)ãAWS LambdaãNode.js 14ã®ãµãã¼ããéå§ãã¾ããã AWS Lambda ã Node.js 14 ã®ãµãã¼ããéå§ Node.js 10ã4ææ«ã§EOL(æ°è¦Lambdaä½æã¯3ææ«ãããã¾ã§)ã«ãªãã®ã§ããã®ã¿ã¤ãã³ã°ã§Node.js 14(ã¾ãã¯12)ã¸ã®ç§»è¡ãæ¤è¨ãã¦ãâ¦
æ¦è¦ JavaScriptã®ã½ã¼ã¹ãåä½ãã¹ãããéãJestã使ã£ã¦ãã人ãå¤ãã¨æãã¾ãã jestjs.io ã§ãããé¢æ°ã®ãã¹ããããéã«ããã®é¢æ°ãå¼ã¶å¥ã®é¢æ°ãä¸æçã«mocké¢æ°ã«ãããå ´åãããã¾ãã Jestã§ã¯ããããspyOn()ã¨ããã¡ã½ããã使ããã¨ã§å®â¦
ã¯ããã« æ°å¹´ããã¾ãã¦ããã§ã¨ããããã¾ãã(ãã1/25ã ãã©) å»å¹´ãããããããã¾ããããä»å¹´ãæ£æä¼ã¿ãçµããããããã平常é転ã«ãæ £ãã¦ããã®ã§ãããã°ã®æ¹ãéå§ãããã¨æãã¾ããã ã§ãæ°å¹´ä¸çºç®ã®ãã¿ã§ãããæåã¯å®å®ã®Serverless Fâ¦
ã¯ããã« JavaScriptã®éåæå¦ç(Promiseã¨ãasync/await)ã«ã¤ãã¦ãä»å¹´ã®1æã«ãä¸è¨ã®ããã°ãæ¸ãã¾ããã makky12.hatenablog.com ããæè¿AWS Lambdaã®éåæå¦çãJavaScriptã§æ¸ãã¦ãã¦ãã¡ãã£ã¨ãããããã£ã¦ãã¾ã£ããã¨ããã£ãã®ã§ãåå¿é²â¦
æ¦è¦ Serverless Frameworkã§ããã±ã¼ã¸ã³ã°ããããã¤ãè¡ãéã«ãã¡ã¢ãªä¸è¶³ã§å¤±æãããã¨ãããã¾ãããã®å ´åã®å¯¾è±¡æ¹æ³ã§ãã serverless.com ç¾è±¡ å æ¥ãæ¥åã§éçºãããµã¼ãã¼ã¬ã¹SPAãServerless Frameworkã§ãããã¤ãããã¨ããããããã±ã¼ã¸ã³â¦
æ¦è¦ å æ¥ãéåæå¦çã«é¢ãã¦ãä¸è¨ã®ãããªãã¤ã¼ãããã¾ããã ã»éåæå¦çAãCã®3ã¤ã»å ¨ã¦æåããå ´åã®ã¿å¦çDãå®è¡ã»AãCã¯ä¾åé¢ä¿ãªãä¸è¨ã±ã¼ã¹ã§ããç´æãã®ããã«await Aawait Bawait Cã¨æ¸ãäºããªãããã«ãè¥æãæå°ããªããã°ãªããâ â¦
çµç·¯ æè¿ãä»äºã§Vue.jsã触ã£ã¦ãã(AWSã«ãããµã¼ãã¼ã¬ã¹SPA)ãä½ã¨ãä¸é±éã§ä»ã®ã¡ã³ããéçºãã§ããåå°(ãã¬ã¼ã ã¯ã¼ã¯çãªãã®)ãVue.jsã§ä½æãã...ç¨åº¦ã¯ã§ããããã«ãªãã¾ããã ãã®ä¸ã§ãã³ã³ãã¼ãã³ã(*.vue)ã®æ±ãã§ãã使ããããªãåâ¦
æ¦è¦ Webãã¹ããã¢ããªã§ãä½ãéåæå¦çãè¡ã£ã¦ããéã«ç»é¢ã«è¡¨ç¤ºããããããããåã£ããããã¢ãã¡ã¼ã·ã§ã³(æ£å¼ã«ã¯ãªãã¦ããã®...Xamarin.Formsã®ãActivity Indicatorãã§ã)ã表示ããæ¹æ³ã§ãã ä½ææ¹æ³ ã¾ããç»åã¯ã©ãããã®ãã¨ãªãã¾ãâ¦
ååã¯Promiseã«ã¤ãã¦æ¸ãã¾ãããããã®ç¶ãã§ä»åã¯async/awaitã«ã¤ãã¦ã ãåèã async/await å ¥éï¼JavaScriptï¼ asyncã¨ã¯ éåæé¢æ°ãå®ç¾©ããé¢æ°å®£è¨ã®ãã¨ã asyncé¢æ°ã¯ã以ä¸ã®åä½ãããã Promiseãè¿ã å¤ãreturnããã¨ãPromiseã¯ãããâ¦
Promiseã«ã¤ã㦠Promiseã¨ã¯ã éåæå¦çãå¶å¾¡ããããã®ããã¿ ES2015以éã§ä½¿ç¨å¯è½ ã¡ãªãã ãã®ï¼. ã³ã¼ããç°¡æ½ã«ãªããè¦ããããªãã(å人差ãã) ä¾ãã°ãéåæé¢æ°func1ãfunc3ããã£ãã¨ãã¦ãä¸è¨ã®å¶ç´ãããå ´åã func2ã¯func1ã®çµæãå¿ â¦
ç¾å¨ä»äºã§node.jsã使ç¨ãã¦ããããåå¼·ãå ¼ãã¦TypeScriptãå°å ¥ãããï¼ãã¨æãå°å ¥ããã®ã§ããã®éã®ã¡ã¢ã1 åæ éçºç°å¢ã¯Visual Studio Codeã(visual Studioã§ãåºæ¥ã¾ãã) node.jsã¨npmãäºåã«ã¤ã³ã¹ãã¼ã«ãã¦ããã(ã©ã¡ããnode.jsã®ã¤ã³â¦
4æããæ°ããããã¸ã§ã¯ãã«ã¢ãµã¤ã³ããã®ã§ãããæ©ãããC#ãããã£ã¦è©±ã ã£ãã®ã«å ¨ç¶ãããªããããï¼è©±ãéãï¼ãã¿ãããªäºã«ãªã£ã¦ã¾ãâ¦ã§ããXamarinããããï¼XAMLã¿ããã«MVVMããããï¼ãã¨ãæã£ã¦ãããï¼C#ã§ã¯ãªãã§ããï¼ãknockout.jsãâ¦
ãªã¬ã¯ä¼ç¤¾ãããããï¼ã¸ã§ã¸ã§ã¼ã¼ãï¼ã¨ãã訳ã§ãä»ã¾ã§è²ã æ¸ãã¦ããä¼ç¤¾ã®ãã¨ã§ãããã¨ãã¨ãè¾ãã¾ããã ä»ã¾ã§è²ã ãã£ãã®ã§ãããããããªå¥´ã®ä¸ã«ãã£ã¨ãããã絶対ãã¡ã«ãªããªâ¦ãã¨ãã決å®çãªãã¨ããã£ãã®ã§ãæ¡ã®å®ãè¾ãã¦ããã£ã¦â¦