2016å¹´ã«JavaScriptãå¦ã¶ã¨ãããªæã
ãã®ã¹ãã¼ãªã¼ã¯ãCircle CIã«æ稿ãããâItâs the futureâã¨ããã¹ãã¼ãªã¼ã«ã¤ã³ã¹ãã¤ã¢ããããã®ã§ãããªãªã¸ãã«ã¯ãã¡ããããã«æ¸ãããã¨ã¯ä¸ã¤ã®æè¦ã¨ããã ãã§ãä»ã®JavaScriptãã¬ã¼ã ã¯ã¼ã¯ãããã§ãããéå°ã«çã«åããªãã§ãã ããããã®ã¹ãã¼ãªã¼ãå·çä¸ã«æ°ããªJavaScriptãã¬ã¼ã ã¯ã¼ã¯ã¯ä½æããã¦ãã¾ããã
ãããä»æ°ããããã¸ã§ã¯ãããã£ã¦ãããã ãã©ãå®ã¯ããæ°å¹´ã¦ã§ãã®ã³ã¼ãæ¸ãã¦ããªãã¦ããããã以åã¨ã¯å°ãå¤ãã£ãã¨ãèãã¦ããããããã§åãä¸çªãã®è¾ºã§ã¦ã§ãéçºã«è©³ããã£ã¦èãããã ãã©ï¼
-ããã³ãã¨ã³ãã¨ã³ã¸ãã¢ãã¨ãã£ãã»ããæ£ãããâ¦ã¾ãã俺ãªãééããªãã俺ã®ã¯2016å¹´ã®ã¦ã§ãã ãããªããã¸ã¥ã¢ã©ã¤ã¼ã¼ã·ã§ã³ããã¥ã¼ã¸ãã¯ãã¬ã¤ã¤ã¼ããµãã«ã¼ãããããã¼ã³çã ãJsConfã¨ReactConfãã帰ã£ã¦ããã°ããã ããã¦ã§ãéçºã®ææ°ãã¯ããã¸ã¼ãç¥ã£ã¦ããã
ããããä»ã¦ã¼ã¶ã®ææ°ã®ã¢ã¯ãã£ããã£ã表示ãããã¼ã¸ãä½ããã¨ãã¦ãã¦ãããã§RESTã¨ã³ããã¤ã³ããããã¼ã¿ãåå¾ãã¦ãã£ã«ã¿å¯è½ãªãã¼ãã«å ã«è¡¨ç¤ºããã¦ããµã¼ãå´ã§ä½ãå¤æ´ããã£ããæ´æ°ããããã¿ãããªãã¨ããããããã ãããã§ãã¼ã¿ã®åå¾ã«jQueryã使ã£ã¦ãã¼ã¿ããã¼ã¸ä¸ã«è¡¨ç¤ºãããããã¨èãã¦ãããã ãã©ã
-ãªã¼ãã¤ã´ãããã ãã ãjQueryãªãã¦ãã誰ã使ã£ã¦ããªããReactã試ããã»ããããã2016å¹´ã ãããªã
ããããªãã»ã©ãReactã£ã¦ä½ã ãï¼
-Facebookã®ä¸ã®é£ä¸ã«ãã£ã¦ä½ãããè¶ ã¯ã¼ã«ãªã©ã¤ãã©ãªã ããã¥ã¼ã®å¤æ´ã®å¶å¾¡ãç°¡åã«ãªã£ããã¨ã§ã¢ããªã±ã¼ã·ã§ã³ã®ã³ã³ããã¼ã«ã¨ããã©ã¼ãã³ã¹ãé£èºçã«ä¸ãããã ã
ãããããµã¼ãããåå¾ãããã¼ã¿ã表示ããããã«Reactã使ããã¨ã¯ã§ããï¼
-ãããã§ãã¾ãã¯Reactã¨React DOMã®ã©ã¤ãã©ãªãã¦ã§ããã¼ã¸ã«è¿½å ããå¿ è¦ãããã
å¾ ã£ã¦ããªã2ã¤ã®ã©ã¤ãã©ãªãªãã ãï¼
-ã²ã¨ã¤ã¯å®éã®ã©ã¤ãã©ãªãããã²ã¨ã¤ã¯DOMãæä½ããããã®ãã®ã§ãããã«ãã£ã¦JSXã§è¨è¿°ãããã¨ãã§ããããã«ãªãã
JSXï¼JSXã£ã¦ï¼
-JSXã¯JavaScriptã®æ§ææ¡å¼µã§ãXMLã¨ã»ã¨ãã©åãã ãDOMãè¨è¿°ããããã®å¥ã®æ¹æ³ã®ãããªãã®ã ãHTMLããã£ã¨è¯ããããã®ã¨èããã°ããã
HTMLãããããªãã®ããï¼
-2016å¹´ã ãããªã誰ãHTMLãç´æ¥ã³ã¼ãã£ã³ã°ãããã¤ãªãã¦ããªãã
ãªãã»ã©ãã¨ã«ãããã®2ã¤ã®ã©ã¤ãã©ãªãå°å ¥ããã°Reactã使ããããã«ãªãããã ãï¼
-ã¡ãã£ã¨éããªãBabelã追å ããå¿ è¦ããã£ã¦ããã®å¾ä½¿ããããã«ãªããã ã
å¥ã®ã©ã¤ãã©ãªï¼Babelã£ã¦ä½ï¼
-Babelã¯ãã©ã³ã¹ãã¤ã©ã®ãã¨ã ãããã使ãã°ã©ããªãã¼ã¸ã§ã³ã®JavaScriptã³ã¼ããæ¸ããã¨ãã¦ãç¹å®ã®ãã¼ã¸ã§ã³ã«ã³ã³ãã¤ã«ãããã¨ãã§ãããã¤ã¾ããåãã¾ã ES5ã使ã£ã¦ãã®ãªãReactJSã使ãã®ã«Babelã使ãå¿ è¦ãããã£ã¦ãã¨ã ãããã¦ç¾å®ãè¦ããããã»ãã®ã¯ã¼ã«ãããºéã¯ES2016+ã使ã£ã¦ãã
ES5ï¼ ES2016+ï¼ä»ã®ã§ããããããªããªã£ããã ES5ã¨ES2016+ã£ã¦ä½ï¼
-ES5ã¯ECMAScript 5ã®ç¥ã ãç¾å¨ã®ã»ã¨ãã©ã®ãã©ã¦ã¶ã«å®è£ ããã¦ããã»ã¨ãã©ã®ã¨ã³ã¸ãã¢ãã¿ã¼ã²ããã«ãã¦ããã¨ãã£ã·ã§ã³ã ã
ECMAScriptï¼
-ããã ãã¤ã¾ãJavaScriptã¯1995å¹´ã«æåã«ãªãªã¼ã¹ãããã¨ãã¯Livescriptã¨ããå称ã§ãNetscape Navigatorä¸ã§ããåä½ããªãã£ããããã¦1999å¹´ã«ã¹ã¿ã³ãã¼ããªJavaScriptã確ç«ãããããã ããå½æã¯ã¨ã£æ£ããã£ãç¶æ ã ã£ãããããä»ã¯ããããããã¨ã«7ã¤ã®ã¨ãã£ã·ã§ã³ã«ã¾ã¨ã¾ã£ã¦ãããã ã
7ã¤ã®ã¨ãã£ã·ã§ã³â¦ãªãã»ã©ãã§ãES5ã¨ES2016 +ã¨ããã®ã¯ï¼
-ãããã5çªç®ã¨7çªç®ã®ã¨ãã£ã·ã§ã³ã®ãã¨ã ã
6çªç®ã¯ã©ãããã®ï¼
-ES6ã®ãã¨ãï¼ããã¤ã¾ããããããã®ã¨ãã£ã·ã§ã³ã¯ãã®åã®ã¨ãã£ã·ã§ã³ã®ã¹ã¼ãã¼ã»ãããªã®ããã ããããåãES2016+ã使ã£ã¦ãããªãããã以åã®ãã¼ã¸ã§ã³ã®å ¨ã¦ã®æ©è½ã使ã£ã¦ãããã¨ã«ãªãã
ãªãã»ã©ãã§ä½æ ES6ãããªãã¦ãã®ä¸ã®ES2016+ã使ãã®ï¼
-ã¾ããES6ã使ããã¨ãã§ãããã§ãasyncãawaitã¿ãããªã¯ã¼ã«ãªæ©è½ã使ãããã«ã¯ES2016+ã使ãå¿ è¦ãããããããé©åãªå¶å¾¡ããã¼ã®ããã®éåæå¼ã³åºãããããã¯ããããã«ES6ã¨ã³ã«ã¼ãã³ã使ããã ã
ä»åãè¨ã£ãæå³ãå ¨ãããããªããâ¦ããããªååãåºã¦ãã¦æ··ä¹±ãã¦ãããããããåã®ãããããã¨ã¯ãµã¼ããããã¼ã¿ããã¼ãããã¨ãããã¨ã§ãCDNããjQueryãã¤ã³ã¯ã«ã¼ããã¦AJAXã§ãã¼ã¿ãåã£ã¦ããã°åã¯ã§ãããã ãä½ã§ãã®ããæ¹ããã ããªã®ï¼
-2016å¹´ã ãããªã誰ãjQueryãªãã¦ä½¿ããªããã ãã¨ãã§ããªãã¹ãã²ããã£ã³ã¼ãã®æãã§ããã ãã ãããªãã¿ããªãããç¥ã£ã¦ãã®ãã
ãªãã»ã©â¦ãããæ°ããããæ¹ã§ã¯3ã¤ã®ã©ã¤ãã©ãªããã¼ãããã¨ãããããã°ãµã¼ããããã¼ã¿ãåãåºãã¦HTMLãã¼ãã«ã«è¡¨ç¤ºããããã¨ãã§ããã
-ã¾ãã3ã¤ã®ã©ã¤ãã©ãªãã¤ã³ã¯ã«ã¼ããããã ããã¢ã¸ã¥ã¼ã«ããã¼ã¸ã£ã§1ã¤ã®ãã¡ã¤ã«ã«çºãã¦ãããã¼ãããããã ã
ã¯ããã¢ã¸ã¥ã¼ã«ããã¼ã¸ã£ã¨ã¯ï¼
-ãã®å®ç¾©ã¯ç°å¢ã«ãã£ã¦ç°ãªããªãã§ãã¦ã§ãçéã§ã¯AMDã¾ãã¯CommonJSã¢ã¸ã¥ã¼ã«ããµãã¼ããããã®å ¨ã¦ãæãã
ãªããªãã»ã©ãã§AMDã¨CommonJSã¨ã¯â¦ï¼
-å®ç¾©ããè¤æ°ã®JavaScriptã©ã¤ãã©ãªã¨ã¯ã©ã¹ãã¤ã³ã¿ã©ã¯ããããè¨è¿°æ¹æ³ã¨ãè¨ããexportãrequireã¯ç¥ã£ã¦ããããªï¼AMDã¾ãã¯CommonJS APIã«åã£ã¦è¤æ°ã®JavaScriptãã¡ã¤ã«ãæ¸ãã¦ãBrowserifyçã§ãããããã³ãã«ããããã ã
ãããããã¯çã«ããªã£ã¦ãããã¨æããããBrowserifyã£ã¦ï¼
-CommonJSã§è¨è¿°ãããä¾åé¢ä¿ããã©ã¦ã¶ä¸ã§åä½ãããã¡ã¤ã«ã«ãã³ãã«ãããã¨ãã§ãããã¼ã«ããã¿ããªãnpmã¬ã¸ã¹ããªã«ãããã®ä¾åé¢ä¿ãå ¬éãããã¨ããçã¾ãããã¼ã«ã ã
npmã¬ã¸ã¹ããªï¼
-ã¹ãã¼ããªé£ä¸ãã³ã¼ããä¾åé¢ä¿ãã¢ã¸ã¥ã¼ã«ã¨ãã¦é ç½®ãã巨大ãªãããªãã¯ã¬ã¸ã¹ããªã®ãã¨ã ã
CDNã¿ãããªãã®ï¼
-å°ãéããªã誰ã§ãã©ã¤ãã©ãªããããªãã·ã¥ããããã¦ã³ãã¼ããããã§ããä¸å¤®é権åããããã¼ã¿ãã¼ã¹ã¨è¨ã£ãæ¹ãæ£ãããªãéçºã®ããã«ãã¼ã«ã«ã§ãã®ã©ã¤ãã©ãªã使ã£ã¦ããããä»åº¦ã¯CDNã«ã¢ãããã¼ããããã¨ãã§ããã
ããBowerã¿ãããªãã®ã ãï¼
-ãããã§ãä»ã¯2016å¹´ã ãããªã誰ãBowerãªãã¦ä½¿ããªãã
ãªãã»ã©â¦ã¤ã¾ãã©ã¤ãã©ãªãnpmãããã¦ã³ãã¼ãããå¿ è¦ãããã¨ãããã§ãã®å¾ã¯ï¼
-ããã ãªãä¾ãã°Reactã使ããããªããReactã¢ã¸ã¥ã¼ã«ããã¦ã³ãã¼ããã¦ã³ã¼ãã«ã¤ã³ãã¼ããããããã¥ã©ã¼ãªJavaScriptã©ã¤ãã©ãªã¯å¤§ä½ãããªæãã ã
Angularã¨åãã ãï¼
-Angularã¯ããªã2015å¹´ã ããã¾ãããã ãªãAngularã§ãããã俺ãè¨ã£ã¦ãã®ã¯VueJSã¨ãRxJSã¨ããã®ä»ã®ã¯ã¼ã«ãª2016å¹´ã©ã¤ãã©ãªã®ãã¨ã ãç¥ããããï¼
ã¾ãã¯Reactã«ãããâ¦ä»å¤§éã®ãã¨ãå¦ãã§ããããã¨ãªãã¨ãã®npmããReactãæã£ã¦ãã¦Browserifyã¨ããã®ã使ãã°è¯ãã¨ï¼
-ããã
沢山ã®ä¾åé¢ä¿ãçµã³ã¤ãã¦ãã³ãã«ããã«ã¯ããªãè¤ééããªãï¼
-ãããBrowserifyãèªååããããã«GruntãGulpãBroccoliã使ãçç±ã¯ããã«ãããMimosaã§ãè¯ãã
Gruntï¼Gulpï¼Broccoliï¼Mimosaï¼ä¸ä½ä½ã話ãã¦ãããã ãï¼
-ã¿ã¹ã¯ããã¼ã¸ã£ã ãã¾ããããã¾ã人æ°ã¯ãªãããªã俺ã2015å¹´ã¨ãã«ã¯ãã使ã£ã¦ããããã®ãã¨Makefilesã§ãä»ã¯Webpackã使ã£ã¦ããã
Makefileï¼Cã¨ãC++ã®ããã¸ã§ã¯ãã§ä½¿ããããã®ã ã¨ã°ããæã£ã¦ãããã
-ãããã§ãã¦ã§ãçéã®é£ä¸ã¯ç©äºãè¤éåãã¦çµå±åºæ¬ã«ç«ã¡è¿ãã®ã好ããªãã ããããããã¨ãæ¯å¹´ç¹°ãè¿ãã¦ã¦ãå¤åå¾ ã£ã¦ããã°ã1,2å¹´å¾ã«ã¯ä¿ºéã¯ã¦ã§ãã§ã¢ã»ã³ããªã使ãããã«ãªãã ããã
ã¯ãâ¦ãã£ãã®Webpackã¨è¨ããã®ã¯ï¼
-ãã©ã¦ã¶ç¨ã®ããä¸ã¤ã®ã¢ã¸ã¥ã¼ã«ããã¼ã¸ã£ã ãã¿ã¹ã¯ã©ã³ãã¼ã®ãããªãã®ã§ããããBrowserifyããã¿ã¼ã«ãããã¼ã¸ã§ã³ã¿ãããªãã®ã ã
ããããâ¦ä½æ ãã¿ã¼ãªã®ï¼
-ã¾ãããã¿ã¼ã§ã¯ãªããããããªãããä¾åé¢ä¿ãã©ã®ããã«çµã³ã¤ãã¹ããã¨ããç¹ã§ããã«èªå·±ä¸»å¼µãã§ãããWebpackãªãCommonJSã®ãã¤ã ããããªãã¦ãä¾ãã°ããã ãªãã¤ãã£ãES6ããµãã¼ããããã¢ã¸ã¥ã¼ã«ã¿ãããªç°ãªãã¢ã¸ã¥ã¼ã«ããã¼ã¸ã£ã使ããã¨ãã§ããã
ãã®CommonJSã¨ãES6ã¨ãããã®ã§ãã®ãããæ··ä¹±ãã¦ãããã
-ã¿ããªããããã§ãåã¯ããSystemJSã«ã¤ãã¦ã¯æ°ã«ããªãã¦ããã
ã¸ã¼ã¶ã¹ãä»åº¦ã¯å¥ã®jsãåºã¦ããããªã¼ã±ã¼ããããã®SystemJSã¨ããã®ã¯ä½ã ãï¼
-ããã ãªãBrowserifyãWebpack 1.xãä¸ã¤ã®å·¨å¤§ãªãã¡ã¤ã«ãä½ãã®ã¨éã£ã¦ãSystemJSã¯è¤æ°ã®ãã¡ã¤ã«ã«è¨è¿°ãããè¤æ°ã®ã¢ã¸ã¥ã¼ã«ãç´ä»ããåçã¢ã¸ã¥ã¼ã«ãã¼ãã¼ãªã®ãã
å¾ ã£ã¦ãã§ãåããããããã®ã¯ã©ã¤ãã©ãªããã«ããã¦ä¸ã¤ã®å¤§ããªãã¡ã¤ã«ãä½ã£ã¦ããããã¼ããããã¨ã ãï¼ï¼
- ãããã§ãHTTP/2ãããããæ¥ããããããªãã¨è¤æ°ã®HTTPãªã¯ã¨ã¹ãã®æ¹ã好ã¾ããã®ãã
ã¨ãããã¨ã¯Reactã®ãªãªã¸ãã«ã®3ã¤ã®ã©ã¤ãã©ãªã追å ããã°ããããããªãï¼
-ããã§ããªããã¨ããã®ã¯ãããããCDNã使ã£ã¦å¤é¨ãããã¼ããããã¨ãã§ããããããããå ´åã§ãBabelã¯ã¤ã³ã¯ã«ã¼ãããå¿ è¦ãããã ããã
ã¯ãâ¦ã§ããã¯ããã¾ãè¯ããªããã§ããï¼
-ãããBabelå ¨ä½ã®ã³ã¢ãã¤ã³ã¯ã«ã¼ããããã¨ã«ãªãã ããããæ¬çªç°å¢ã§ããã¯å¹çãè¯ããªããæ¬çªç°å¢ã¯ãã§åµã®ã¬ã·ãã®ããã«ç°¡åã«ãµã¿ã³ãå¬åããããã®åå¼ããã¤ã§ãã§ããããã«ããã¸ã§ã¯ããæºåãã¦åããã¦ããå¿ è¦ããããã¢ã»ããã¯å°ãªããã¦ãé£èªåãã¦ããã®ä¸ã§cssãã¤ã³ã©ã¤ã³ãã¦ãã¹ã¯ãªãããå¼ã伸ã°ãã¦â¦
ããã£ããããããã£ããããããCDNã«ç´æ¥ã©ã¤ãã©ãªãé ç½®ã§ããªããªããã©ããã£ã¦ããã°ããã®ï¼
-Webpack + SystemJS + Babelã®ã³ã³ãã§Typescriptãããã©ã³ã¹ãã¤ã«ããã®ãã
Typescriptï¼JavaScriptã§ã³ã¼ãã£ã³ã°ããã®ãã¨æã£ã¦ããï¼
-Typescriptã¯JavaScriptã ãJavaScriptã®ã¹ã¼ãã¼ã»ããããã£ã¨å³å¯ã«ã¯ãã¼ã¸ã§ã³ES6ã®JavaScriptã ããã£ã話ãã6çªç®ã®ãã¼ã¸ã§ã³ã®ãã¨ã¯æ¶ãã¦ãããï¼
ES2016+ãES6ã®ã¹ã¼ãã¼ã»ãããªããããªãã®ï¼ï¼ãªãã§Typescriptãå¿ è¦ãªã®ï¼
-ã¾ããããã使ãã°ä¿ºéã¯JavaScriptãéçåä»ãè¨èªã¨ãã¦ä½¿ããããã«ãªããã©ã³ã¿ã¤ã ã¨ã©ã¼ãæ¸ãããã®ãã2016å¹´ã ãããªãããã¤ãã®åãJavaScriptã«å ¥ãã¦ãããã»ããããã
Typescriptãã¾ãã«ããã ã¨ã
-Flowãããã ãTypescriptãã³ã³ãã¤ã«ãããå¿ è¦ãããJavaScriptã®ã¹ã¼ãã¼ã»ããã§ããä¸æ¹ã§ãFlowã¯ã¿ã¤ãã³ã°ãããã§ãã¯ããªããã ãã©ãªã
ã¯ãâ¦ããã§Flowã¨ã¯ï¼
-Facebookã®ã¨ã³ã¸ãã¢ãä½ã£ãéçã¿ã¤ããã§ãã«ã¼ã ãå½¼ãã¯ãããOCamlã®ä¸ã«ã³ã¼ããããã ãé¢æ°åããã°ã©ãã³ã°ã¯æé«ã ãããªã
OCamlï¼é¢æ°åããã°ã©ãã³ã°ï¼
-ç¾ä»£ã®ã¯ã¼ã«ãããºã使ããã¤ã ããããã ãã2016å¹´ã ãããªãé¢æ°åããã°ã©ãã³ã°ã¨ãé«æ¬¡æ©è½ã¨ãã«ãªã¼åã¨ããã¥ã¢ãã¡ã³ã¯ã·ã§ã³ã¨ãã ã
å ¨ããããããããªãã
-ã¿ããªæåã¯ããããããããé¢æ°åããã°ã©ãã³ã°ã¯OOPãããåªãã¦ãã¦ããããã俺ãã2016å¹´ã«ä½¿ãã¹ããã®ã ã
å¾ ã£ã¦ãåã¯å¤§å¦ã§OOPãå¦ãã ããOOPã£ã¦è¯ãããããªãã£ãã£ãï¼
-JavaãOracleã«è²·åãããã¾ã§ã¯ãªãã¤ã¾ããOOPã¯å½æã¯è¯ãã£ãããä»ã§ã使ããã¦ãããã§ãä»ãç¶æ ãå¤æ´ãããã¨ã¯èµ¤ã¡ãããè¹´ããã¨ã¨çããã¨ãããã¨ã¯å¨ç¥ã®äºå®ã§ãã ããã¿ããªã¤ãã¥ã¼ã¿ãã«ãªãã¸ã§ã¯ãã¨é¢æ°åããã°ã©ãã³ã°ã«ç§»è¡ãã¦ããã®ããHaskellã®ãã¤ãã¯ä½å¹´ããããæå±ãã¦ãã¦ã俺ã¯Elmã®é£ä¸ã¨ä¸ç·ã«ãããã¨ã¯æããªãã£ããã§ãã©ããã¼ãªãã¨ã«ã¦ã§ãã§ã¯ä»Ramdaã¿ãããªã©ã¤ãã©ãªãã§ãããããã§ä¿ºãã¡ã¯ãã¬ã¼ã³ã®JavaScriptã§é¢æ°åããã°ã©ãã³ã°ãæ¸ããã¨ãã§ããã®ãã
åããããã¦ããã¨æ¬¡ã ã¨æ°ããååã ãã¦ãªãããï¼ä¸ä½Ramndaã£ã¦ä½ã ãï¼
-éãRamdaã ãLambdaã¿ããã«ããã¤ãããã»ãã§ã³ãã¼ã¹ã®ã©ã¤ãã©ãªãï¼
ãã¤ããã誰ï¼
-ãã¤ãããã»ãã§ã³ãã¼ã¹ãã¯ã¼ã«ãªå¥´ããå½¼ã¯æå°ã®æªãã¯ã¼ãã¿ã¼ã²ã¼ã ããã¬ã¤ããã Ramdaã®ã³ã³ããªãã¥ã¼ã¿ã¼ã®1人ã§ããããé¢æ°åããã°ã©ãã³ã°ããã¸ã§å¦ã³ãããªãã¨ãªãã¯ã»ã¡ã¤ã¤ã¼ããã§ãã¯ãã¦ãããã»ããããã
ããã§ã¨ãªãã¯ã»ã¡ã¤ã¤ã¼ã¨ããã®ã¯...ï¼
-é¢æ°åããã°ã©ãã³ã°ãä½ã£ã1人ã ãæé«ã®ç·ã ãã趣å³ã®æªãã«ã©ã¼ã·ã£ããçãªããã¢ã¸ã£ã¤ã«ãããã¯ã½ã«è¨ãå½¼ã®ãã¬ã¼ã³åç»ã沢山ããããè¦ã¦ã¿ãã¨ããããã¨ãã§ãã¯ãã¦ããã¹ããªã®ã¯Tjãã¸ã£ã·ã¥ã»ã±ãã¹ãã·ã³ãã©ã»ã½ã¼ã©ã¹ããã¼ã«ã»ã¢ã¤ãªãã·ã¥ãã¢ãã£ã»ãªã¹ããâ¦
ãªã¼ã±ã¼ããã®è¾ºã§ååã ããã§ããµã¼ããããã¼ã¿ããã§ãããã¦(åãåºãã¦)表示ããã«ã¯ä»ã¾ã§æãã¦ããã£ããã¨ã¯è¤éã ãä¸å¿ è¦ãããªãï¼ã¨ã«ããåçãã¼ã¿ã§ãã¼ãã«ãä½æããã®ã«ãã£ãã®äººã ã«ã¤ãã¦å¦ã¶å¿ è¦ãç¡ãã®ã¯ééããªãããReactã«æ»ãããReactã使ã£ã¦ãµã¼ããããã¼ã¿ããã§ããããã«ã¯ã©ãããã°è¯ãã®ï¼
-ããã ãªãå®éã¯Reactã使ã£ã¦ãã§ããã¯ããªããReactã使ã£ã¦ããã®ã¯ãã¼ã¿ã®è¡¨ç¤ºã ãã ã
ããã ãã ããããããã¼ã¿ããã§ããããã«ã¯ä½ã使ãã®ï¼
-Fetchã使ãã®ãã
ä½ã ã£ã¦ï¼ãã¼ã¿ããã§ããããã®ã«Fetchã使ãï¼èª°ã ããããªååã«ããã®ã¯ã
-ã ããªï¼Fetchã¯ãµã¼ãã«å¯¾ãã¦XMLHttpRequestsãå®è¡ããããã®ãã¤ãã£ãå®è£ ã®ãã¨ã ã
ã¯ããã¤ã¾ãAJAXã ãã
-AJAXã¯XMLHttpRequestsã使ç¨ããä¸ä¾ã«éããªããFetchã使ããã¨ã§promiseãªãã¸ã§ã¯ããåºæ¬ã¨ããAJAXã使ããããã«ãªããã³ã¼ã«ããã¯å°çãé¿ãããã¨ãã§ããã®ãã
ã³ã¼ã«ããã¯å°çï¼
-ãããä¾ãã°ãµã¼ãã«å¯¾ãã¦éåæãªã¯ã¨ã¹ãããã度ã«ããµã¼ãããã®å¿çãå¾ ããªããã°ãªããªããããã¦ãã®ããã«é¢æ°ã®ä¸ã«é¢æ°ãå ¥ãããã¨ã«ãªã£ã¦ã俺éã¯ãããå°çããã®ã³ã¼ã«ããã¯ãã©ãããèªãã§ããã
ãªããªãã»ã©ãããã§promiseãªãã¸ã§ã¯ããããã解決ããã¨ï¼
-ãã®ã¨ããã ãpromiseãªãã¸ã§ã¯ããéãã¦ã³ã¼ã«ããã¯ãæä½ãããã¨ã«ãããã³ã¼ãã®è¨è¿°ãã¢ãã¯ããã¹ããç°¡åã«ãªããããã«ä¸åº¦ã«è¤æ°ã®ãªã¯ã¨ã¹ããéä¿¡ãã¦å ¨ã¦ããã¼ããããã¾ã§å¾ ã¤ãã¨ãç°¡åã ã
ããã¦ãããFetchã§ã§ããã¨ï¼
-ãããã§ãããã¯ã¦ã¼ã¶ã人æ°ã®ç¡ããã©ã¦ã¶ãå©ç¨ãã¦ããå ´åã«éãããªããã以å¤ã«å¯¾å¿ããããã«ã¯fetch-polyfillãRequestãBluebirdãã¾ãã¯Axiosã®ãããããã¤ã³ã¯ã«ã¼ãããå¿ è¦ãããã
ä¸ä½ã©ããããã®ã©ã¤ãã©ãªãç¥ãå¿ è¦ããããã ãï¼å ¨é¨ã§ããã¤ããã®ï¼
-JavaScriptã ãããªãä½åã¨ããã©ã¤ãã©ãªãåå¨ãã¦ããã®å ¨ã¦ãåãç®çã®ããã«ä½¿ç¨ãããã俺éã¯ã©ã¤ãã©ãªãç¥ã£ã¦ãã¦ãããã¦ãã®ä¸ã®ãã¹ããªã©ã¤ãã©ãªãæã£ã¦ããã俺ãã¡ã®ã©ã¤ãã©ãªã¯è¶ 巨大ã§ãæã ãã®ä¸ã«ã¬ã¤ã»ãã£ã¨ãªã®åçãå ¥ãã¦ä½¿ã£ã¦ããã
ä»ã¬ã¤ã»ãã£ã¨ãªã£ã¦è¨ããªãã£ãï¼ããããããçµããã«ãããããã®Bluebirdã¨ãRequestã¨ãAxiosã¨ããã©ã¤ãã©ãªã¯ä½ããããã®ãªã®ï¼
-ãããã¯XMLHttpRequestsãå®è¡ãã¦promiseãªãã¸ã§ã¯ããè¿ãããã®ã©ã¤ãã©ãªãã
jQueryã使ã£ãAJAXãåãããã«promiseãªãã¸ã§ã¯ããè¿ããªãã£ãï¼
-俺ãã¡ã¯ãããJãã¨ããè¨èã¯ä½¿ããªããã ã2016å¹´ã ãããªãFetchã使ã£ã¦ããã©ã¦ã¶ä¸ã«ããããªãã£ããpolyfillããã¾ãã¯BlubirdãRequestãAxiosã代ããã«ä½¿ãã®ããããã¦éåæé¢æ°å ã§awaitã使ã£ã¦promiseãªãã¸ã§ã¯ããå¶å¾¡ããã°ãããã ãã§é©åãªå¶å¾¡ããã¼ã®åºæ¥ä¸ãããã
åãawaitã£ã¦è¨èã使ã£ãã®ã¯3åç®ã ãã©åã¯ãããä½ã§ãããå ¨ãããã£ã¦ããªããã
-Awaitã使ãã°éåæå¦çããããã¯ãããã¨ãã§ãããããã«ãã£ã¦ãã¼ã¿ããã§ãããã¦ããæä¸ã«ãå¶å¾¡ãããã¨ãã§ããã¾ãå ¨ä½çã«ã³ã¼ãã®å¯èªæ§ãåä¸ããããã¨ãã§ãããæé«ãªã®ã¯ãåãæ°ã«ããã°ãããã¨ãBabelã®stage-3ããªã»ããã追å ãããã¨ãã¾ãã¯syntax-async-functionã¨transform-async-to-generator ãã©ã°ã¤ã³ã使ããã¨ã ãã ã¨ãããã¨ã ã
çæ°ã¨ããè¨ãããããªãã
-ããããawaitã使ãããã«Typescriptã®ã³ã¼ããããªã³ã³ãã¤ã«ãã¦ãããBabelã§ãã©ã³ã¹ãã¤ã«ããå¿ è¦ãããã¨ããäºå®ã®ã»ããçæ°ãã
ãï¼ããã£ã¦Typescriptã«å«ã¾ãã¦ããªãã®ï¼
-次ã®ãã¼ã¸ã§ã³ã§ã¯å«ã¾ããäºå®ã ããç¾æç¹ã®ãã¼ã¸ã§ã³1.7ã¯ES6ããã¿ã¼ã²ããã«ãã¦ããªããã ãããããã©ã¦ã¶ã§awaitã使ããããªããã¾ãTypescriptã®ã³ã¼ããES6ãã¿ã¼ã²ããã«ãã¦ã³ã³ãã¤ã«ãã¦ã次ã«Babelãã¦ES5ãã¿ã¼ã²ããã«ããã®ãã
ããä½ã¨è¨ãã°è¯ãã®ãããããªãã
-ããããç°¡åããå ¨ã¦ãTypescriptã§ã³ã¼ããããã ã次ã«Fetchã使ãå ¨ã¦ã®ã¢ã¸ã¥ã¼ã«ãES6ã«ã³ã³ãã¤ã«ãã¦ãstage-3ããªã»ããã®Babelã§ãã©ã³ã¹ãã¤ã«ãã¦ãSystemJSã¨ä¸ç·ã«ãã¼ããããFetchãæã£ã¦ããªãã®ã§ããã°ãpolyfillãããã¾ãã¯BluebirdãRequestãAxiosã使ããããã¦awaitãã¤ãã£ã¦å ¨ã¦ã®promiseãªãã¸ã§ã¯ããå¶å¾¡ããã
åãã¡ã®ãç°¡åãã®å®ç¾©ã¯å ¨ãå¥ç©ã®ããã ããããã§ãããã使ã£ã¦æçµçã«Reactã§è¡¨ç¤ºãããã¨ãã§ãããã ãï¼
-åã®ã¢ããªã±ã¼ã·ã§ã³ã¯ç¶æ ã®å¤æ´ã¯å¶å¾¡ããã®ãï¼
ãã¼ãããããªãã¨æããããããã®ã¯ãã¼ã¿ã表示ãããã¨ã ãããã
- å©ãã£ããããã§ãªããã°ä¿ºã¯åã«Fluxã¨ãFlummoxãAltãFluxibleã®ãããªå®è£ ã説æããªãããªããªãã£ããã©ã¡ãã«ããReduxã¯ä½¿ãã¹ãã ããã
ãã沢山ã ãä½åº¦ãè¨ã£ã¦ãããã©åãããããã®ã¯ãã¼ã¿ã表示ãããããã ããªãã ã
-ãã¼ã¿ã表示ãããã ããªãReactã¯å¿ è¦ç¡ãã ããããã³ãã¬ã¼ãã¨ã³ã¸ã³ã§ååã ã
ãããã£ã¦ãã®ï¼ãããªã«é¢ç½ãï¼å人ã家æã«ããããªé¢¨ã«æ¯ãèãã®ï¼
-俺ã¯ãã åã«ä½¿ããããªãã®ãæãã¦ããã ãã ãã
ããã¦ãããããããããã ã
-ã¤ã¾ãããããã³ãã¬ã¼ãã¨ã³ã¸ã³ã ãã使ãå ´åã§ãã俺ã ã£ããTypescript + SystemJS + Bebelã³ã³ãã¯ä½¿ãã ãããªã
åãããããã®ã¯ä¸ã¤ã®ãã¼ã¸ã«ãã¼ã¿ã表示ããã¨ãããã¨ã ãã§ãå代ã¢ã¼ã¿ã«ã³ã³ãããã®ãµãã»ã¼ãã®ç©¶æ¥µç¥æ³ãå®è¡ããããããããªããããã©ã®ãã³ãã¬ã¼ãã¨ã³ã¸ã³ã使ç¨ããã°ããã®ãã ãæãã¦ããããã使ã£ã¦ãã£ã¦ã¿ãããã
-沢山ããããã©ã®ãã³ãã¬ã¼ãã¨ã³ã¸ã³ãªã使ã£ããã¨ãããï¼
ãã¼ããååã¯è¦ãã¦ãªãããããªãåã®è©±ã ãã®ã
-jTemplatesï¼ jQoteï¼PUREï¼
ãã¼ããéããªããä»ã«ã¯ï¼
-Transparencyï¼ JSRenderï¼ MarkupJSï¼ ããã¨ãKnockoutJSï¼2ã¦ã§ã¤ã»ãã¤ã³ãã£ã³ã°ã®ã
ä»ã«ã¯ï¼
-PlatesJSï¼ jQuery-tmplï¼ããã¨ãHandlebarsï¼ããã¯ã¾ã 使ã£ã¦ãããã¤ãããã
ãããªæãã ã£ãã¨æãããã®æå¾ã®ã«ä¼¼ã¦ããã®ä»ã«ãªãï¼
-Mustacheãunderscoreï¼æ£ç´lodashã¯ä»ã§ã使ããã¦ããã¨æããããããã¯ä½ã¨ããã2014å¹´ã ã
ãã¼ãããå¤åå½æã¯æ°ããæ¹ã ã£ããã ãã©ãã
-Jadeï¼ DustJSï¼
ãããã
-DotJSï¼ EJSï¼
ãããã
-Nunjucksï¼ ECTï¼
ãããã
-CoffeeScriptã®æ§æã好ããªãã¤ãªãã¦ããªããããéããªãJadeã¯ï¼
ããããJadeã¯ãã£ãåºã¦ãããã
-ã¤ã¾ãPugã ãJadeãªãã ãã©ãJadeã¯ä»ã¯Pugã ã
ã¯ããããããæãåºããªããåãªãã©ãã«ããã®ï¼
-æããES6ãã¤ãã£ãã®ãã³ãã¬ã¼ãæååã ãªã
åã«å½ã¦ããã¦ãããã¯ES6ãå¿ è¦ã§ã
-ããã
ããã¦ããã¯ä½¿ã£ã¦ãããã©ã¦ã¶ã«ãã£ã¦ã¯Babelãå¿ è¦ã§ã
-ããã
ããã¦ãããã³ã¢ã©ã¤ãã©ãªå ¨ä½ã追å ããã«ã¤ã³ã¯ã«ã¼ããããå ´åã¯ãnpmããä¸ã¤ã®ã¢ã¸ã¥ã¼ã«ã¨ãã¦ããããã¼ãããå¿ è¦ããã£ã¦ã
-ããã
ããã¦ãBrowserifyãã¾ãã¯Wepbackãã¾ãã¯ãã®ä»æ®ã©ã®å ´åã¯SystemJSãå¿ è¦ã§ã
-ããã
ããã¦ãWebpackã§ãªãå ´åã¯ãçæ³çã«ã¯ã¿ã¹ã¯ã©ã³ãã¼ã§ç®¡çãããã¹ãã§ã
-ããã
ã§ããé¢æ°åããã°ã©ãã³ã°ã¨éçåä»ãè¨èªã使ç¨ããã¹ãã ãããã¾ãTypescriptã¾ãã¯Flowçãå ããå¿ è¦ããã£ã¦ã
-ããã
ããã¦ããawaitã使ããããªããããBabelã«éãã¨ã
-ããã
ããããã¨Fetchãpromiseãªãã¸ã§ã¯ããå¶å¾¡ããã¼ãªã©ããããªãã¨ã使ãã¦ã
-Safariã¨ãã¯ãµãã¼ãããã¦ããªãããããã®å ´åã¯Fetchãpolyfillããã®ãå¿ãããªãã
ãããããããããããã ããããããã¦ã§ããJavaScriptãããããã
-ããããã©ããæ°å¹´å¾ã«ã¯ä¿ºéã¯ã¿ããªElmãWeAssemblyã使ã£ã¦ããã ãããããªã
ããã¯ã¨ã³ãã«æ»ããã¨ã«ãããããããªã«å¤ãã®å¤æ´ããã¼ã¸ã§ã³ãã¨ãã£ã·ã§ã³ãã³ã³ãã¤ã©ããã©ã³ã¹ãã¤ã©ãåã«ã¯æ±ããªããããããªã®ã«ãã£ã¨ã¤ãã¦ãããªãã¦èããããªãããJavaScriptã®ã³ãã¥ããã£ã¯çã£ã¦ãã
-ããã£ãããããPythonã®ã³ãã¥ããã£ã試ãã¦ã¿ãã¨ããã
ã©ããã¦ï¼
-Python 3ã®ãã¨èãããã¨ããï¼