ãJSãªã¸ãµã³ã«æãããªãè±åå¿è JavaScriptãã«è¡ã£ã¦ãã¾ãã
javascriptã®åå¼·ãä¸éãçµãã£ãã®ã§ãåå ãã¦ãã¾ããï¼
javascriptã®åå¼·ä¼ã«åå ããã¾ã§ã®éã®ããé·ãã£ãã...(T_T)
Â
話ã®å 容
4åã®JSãªã¸ãµã³ããã®ãããããã話ï¼è³ªåã¿ã¤ã ã£ã¦æãã§ããã
ä¸ã¤ãã¤ãã¤ãã¤ãæ¸ãã¦ããã¾ãï¼â»é·æ注æã§ããï¼ï¼
Â
Â
1.ã½ã¼ã¹ã¬ãã¥ã¼ããå¦ã¶ Javascript + 1
æ ªå¼ä¼ç¤¾ãµã¤ãã¼ã¨ã¼ã¸ã§ã³ãã®ãå®å® æ´å¹³ããã®ã話ã§ãã
ãã£ããã¾ã¨ããã¨ã以ä¸ã®4ç¹ã«ã¤ãã¦ã®ã話ã§ããã
- ã¬ãã¥ã¼ã§ã¿ã¦ãããã¤ã³ã
- ããã°ããªããã¨ããè¨èã®å®ç¾©
- é¢æ°åã®ã¤ãæ¹
- ã¹ãããã¢ããããããã«å¿ è¦ãªãã¨
å°è±¡çã ã£ãã®ã...ã¹ãããã¢ããããããã«å¿ è¦ãªãã¨...ããã¯...
ãæ å ±å¦çæè¡è 試é¨ãåå¼·ãããã§ãã
ãªããªããããããã¼ï¼åè³ã§ãã
Â
æå³ã¨ãã¦ã¯ããã¶ã¤ãã¼ãããªã©ãã·ã¹ãã ã®ä»çµã¿ãç¥ããªã人ã¯åºæ¬ãç¥ãããã«åå¼·ãã¾ããããããããç解é度ãé«ã¾ãã¾ããçãªã話ã§ããã
sudoã£ã¦ãªããããï¼é»ãã³ãã³ããããã¼ãã²ã²ãªç§ã¯ãåå¼·ããã»ãããããªã¼ã¨æãã¾ããã
Â
試é¨ããã¨ç®æ¨ãã£ã¦ããããããã§ãããã
Â
 2.JSãããã as a Service
æ ªå¼ä¼ç¤¾ãã¯ã·ã£ã®Kuniwakããã®ã話ã§ãã
JSãªã·ããµã³ as a Service.pdf - Google ãã©ã¤ãï¼âç»å£è³æï¼
ã¨ã©ã¼ãã§ãã¯ããã¦ããããã¼ã«ãlintã使ã£ã¦ãã¹ããªãããï¼çãªã話ã§ããã
ä»åã¯ESLintã®ä½¿ãæ¹ã®èª¬æã§ããã
Â
lintã使ãæå³ã¨ãã¦ã¯ããtypoãã¹ãªã©ã«æéãåããããã¨ããªããã¦ãæ¬è³ªçãªãã¨ã«éä¸ã§ããããã«ãããï¼ï¼ï¼ãçãªæãã§ãã
Â
ããã§ã²ã¨ã¤åè¨...
ãlintã¯æã JSãªã«ã³ã¨ãªããã§ãï¼ç¬ï¼
ï¼ç§ãsass lintã¤ãã£ã¦ããã§ãã確ãã«ãã¨ã©ã¼ãã´ãã´ããªã£ã¦ããããã§ãããwwwï¼
ã ãã©ãããããããã¨ãã£ã¦ç¡å¹åããã®ã§ã¯ãæå³ãæãã¦ãªãã®ã§ãç¡å¹åããã¨ãã¯ã¡ããã¨ããªãç¡å¹åããã®ãï¼ããªã©æ°ãä»ãã¾ããããã¨ãã£ããã£ã¦ãã¾ããã
Â
ãªãããµã¨æã£ããã§ãããlintãæ¬äººåãã¦æããã¨ä»äºæ¥½ãããªãããã§ãããw
ããã¡ãã...ãããã¨ãï¼çãª
Â
Â
3."same code same result" ãªãã¦æããªã!
æ ªå¼ä¼ç¤¾ã·ã¼ãã¼ã¨ã¹ã®æå° å½°ããã®ã話ã§ãã
Â
ãã£ããã¾ã¨ããã¨ä»¥ä¸ã®4ç¹ã«ã¤ãã¦ã®ã話ã§ããã
- IEã«ã¤ãã¦ï¼ãªãã§IE8ã¾ã§ã¯ãããªã«ãããã¨èããªãã®ã¨ãï¼
- ãã©ã¦ã¶ã¯ãªãã§ããã©ã¦ã¶ã«ãã£ã¦æåãéãã®ã
- ECMAScriptã¨Javascriptã£ã¦ãªãã§2ã¤ããã®ï¼
- ãæ¨æºåãã®ç½ ã«ã¤ãã¦
ãã©ã¦ã¶ã®æ´å²ã£ã¦ãæ®æ®µæ» å¤ã«èããªãã®ã§ã¨ã¦ãè²´éã§ããã
ãã£ã¨ããªãã§IE8ã®ãµãã¼ããåããã®ãã¨ããIE8対å¿ã£ã¦ã®ãããããªãããããªãã®ãã¨ããç解ã§ãã¾ããããã¯
ãããã話ãã£ã¨ãããããªã
Â
4.èªåãJavaScriptãæ¸ãå§ããã°ããã®æã«ãã£ã¦ãã¾ã£ã¦ãããããã©ã¼ãã³ã¹ãæªããªãæ¸ãæ¹
ã©ãã©ã¤ã好ãã§æåãªãæ ªå¼ä¼ç¤¾ã°ã©ãã®kubosho_ããã®ã話ã§ãã
ä¸çªã³ã£ããããã®ãããªã¸ãµã³ã ã£ããã¨ã§ãã...ç«¥é¡ã¯ç½ªã§ããã
jsPerfã使ã£ã¦ããã©ã¼ãã³ã¹ãè¨æ¸¬ãããï¼ã¨ããã話ã§ããã
Â
æ¨æ¸¬ãããªãè¨æ¸¬ããï¼
ãã©ã¦ã¶ã«ãã£ã¦ããã©ã¼ãã³ã¹ãå¤ãããï¼
Â
ã¨ããè¨èã«ããã£ã¨ãã¦ãã¾ãã¾ãã...w
ããã©ã¼ãã³ã¹ã¨ãç»åå§ç¸®ãããããè¦ã¦ãªãã£ããã§ããã
ã¡ããã¨ã§ããããã«ãªããªãã¨ãªã¼ã¨ãã¿ãã¿æãã¾ããã
Â
Â
質åã¿ã¤ã
ç»å£è
4åããtwitterã«å¯ãããã質åã«åçãã¦ãã ããã¾ããã
å°è±¡çã ã£ãã®ãããã¯ã¢ãããã¾ãã
ï¼Aã®é¨åã¯ç§ãåæã«è¦ç´ãã¦ã²ã¨ã¤ã«ãã¦ããã®ã§æªãããã...ï¼
Â
Q.ã¬ãã¥ã¼ã£ã¦ã©ããã¦ãã¾ããï¼
ãã¼ã«ã¨ãã¦ã¯GithubãªããGitlabãªãã¤ãã£ã¦ã¬ãã¥ã¼ããã¾ãã
ãã¡ã°ã大äºã ã¨ãããã®ã¯ã
ãã¬ãã¥ã¼ã¯ãªãã®ããã«ããã®ãå®ç¾©ä»ããããããã¨ã§ããã
mixiã§ã¯ããã°ãè¦ã¤ããããç²æ¢ããããã®ãç®çã§ã¯ãªãã
ã人ã®ã³ã¼ããããã§ã質åããã£ããã³ã¡ã³ãããã¦ãã³ã¡ã³ãã ããã«ããã®ãéè¦ãã ã¨å®ç¾©ãã¦ãã¾ãã
Â
ãã£ãããï¼ï¼ï¼
ãããã«ããã¬ãã¥ã¼ã¯ãªãã®ããã«ããã®ããã足並ã¿æããã»ããå°æããªããç®çãã¯ã£ãããã¦ããã§ãããã
ãªã«ãããã³ã¡ã³ãã§ã°ãã°ã質åã§ããã¨ãåå¼·ã«ããªãï¼
Â
Q.ã²ã¨ãã®ã¨ãã£ã¦ã©ããã¦ã¾ãããï¼
ãã¨ã«ããããã¥ã¡ã³ãã«ãã£ããã³ã¡ã³ããæ¸ãã¾ãããã
ã³ã¡ã³ããããããæ¸ãã¨ãããã¨ã¯ãä»ã®äººã«è¦ããããã®æç« ãæ¸ããã¨ã§ãããã®ã§
èªåã®é ã®ä¸ãæ´çããã¾ãããã
ããã§ããªãã¡ã¯ã¿ãªã³ã°ããã¡ã«ããã®ã大äºã ã¨æãã¾ãã
1ã¶æå¾ã®èªåã¯ä»äººã§ããï¼ç¬ï¼
ãã¨ãGithubã§pull reqããã¦ã人ã®ã³ã¼ããæ·»åãããã¨ã§ãããã
æåã¯ãããåæ°ãããã¾ãã...
æé·ã¹ãã¼ããã¯ãããªãã¨æãã¾ãã
Â
Q.åå¿è ãªãã§ãããã©ãããã°ããã§ããï¼
ãã²ããããã£ã¦ãã ããw
2æ¥ã§ã§ãã! JavaScript ãã¬ã¼ãã³ã° - mixi Engineers' Blog
Â
Â
Q.JSãªã¸ãµã³ããæå¾ã«ã²ã¨ãã¨ãé¡ããã¾ãï¼
Â
ã²ã¨ã¤ãï¼
âGoogleã®Closure Libraryã®ã½ã¼ã¹ãèªãã§åå¼·ãã¦ãã ããï¼ï¼googleãèããæé«ã®ã³ã¼ãã§ãï¼ï¼Â
Â
ãµãã¤ãï¼
 inputã®éãoutputã®éã«ã¤ãªããã¨æãã¾ããå人çã«ã¯ãâã®html5rocksãèªãã®ããããã§ããï¼
Â
ã¿ã£ã¤ãï¼Â
ãã®è¨èªã®ä»æ§æ¸ãã¡ããã¨èªã¿ã¾ãããï¼è±èªã ãã©ãå°ããã¤ããã§ããã°ãè±èªãèªããããã«ãªãã¾ããï¼ããããããããä¼ãããã®ã§ãã²åå ãã¦ã¿ã¦ãã ããã
Â
ãã£ã¤ãï¼
ããã°ãæ¸ããããåå¼·ä¼ã«ç»å£ãã¦ã¿ãããã¦ãã³ã¼ããæ¸ããã¨ä»¥å¤ã§ã®outputãã¡ããã¨ãã¾ãããã
ããããã°ãèªåãããããªããã¨ãæ確åããã¨æãã¾ãï¼
Â
ç·æ¬Â
JSãªã¸ãµã³ãããããã£ãã§ãï¼
ããªããããå¿
è¦ãªã®ãããããããèãæ¹ãããã¨è¯ãã
ããããããµã¤ãã«æ
å ±ã転ãã£ã¦ãããã
ãªã©ã®ãã話ããããã®ããããåå¼·ã«ãªãã¾ããã
ç¥ããªãæ å ±ããããããããã®ã§ãèªåãããã¹ããã¨ãæ確åããã¾ããã
ãã¶ã¤ãã¼ã®åå è ã1å²ãããã§ä»ãã¨ã³ã¸ãã¢ã®äººã ã£ãã®ã«é©ãã¾ããã...åå¿è ãããªãããã¦ããªã
Â
JSãªã¸ãµã³ã次åã¯12æ15æ¥ã17æ¥ã§ãä¸æ¥é£ç¶éå¬ããããã§ãã
èå³ãããæ¹ã¯ãã²è¡ã£ã¦ã¿ã¦ã¯ãããã§ããããï¼
Â
â ããã¾ãâ Â