Service Worker
Service Worker API ã®å°å
¥ã¯、ã¦ã§ãã«æè¿å ããããæãéè¦ãªæ¹åã® 1 ã¤ã§ã。Service Worker ã¯ããã¯ã°ã©ã¦ã³ãã§åä½ãã¦、ãããã¯ã¼ã¯ ãªã¯ã¨ã¹ãã横åãã、ãªã¯ã¨ã¹ããå¦çãã¦、ã¦ã§ãã¢ããªããªãã©ã¤ã³ã§åä½ã§ããããã«ãã¾ã。ãã®ãã、ãããããã¼ã¯ãã¼ã¸ã®éãããã©ã¤ããµã¤ã¯ã«ãã解æ¾ããã¾ã。Service Worker ã使ç¨ããã¨、ãµã¤ãã§ããã·ã¥éç¥ãåãåã£ãã、ããã¯ã°ã©ã¦ã³ãã§ãã¼ã¿ãåæãããã§ãã¾ã。Apple ã¯ä»å¹´ã® 3 æ、
iOS ããã³ MacOS ã«æè¼ããã
Safari 11.1 ã« Service Worker ã®ãµãã¼ãã追å ã、Microsoft Edge ã«ã¯å
é±ãã
Service Worker ãä»å±ããããã«ãªãã¾ãã。
ã¤ã¾ã、ç¾å¨、ãã¹ã¦ã®ææ°ãã©ã¦ã¶ã§ãã®è¦æ ¼ããµãã¼ãããã¦ãã¾ã。Service Worker ã®ä½¿ç¨ã¯ã¢ã¼ããã¯ãã£ã«å¯¾ãã大ããªå¤æ´ã«ãªãå¯è½æ§ããããã、æ軽ã«ä½¿ç¨ã§ããããã«、Google ã¯
Workbox ãä½æã、æ±ç¨çãã¤å¼·åãªå¤ãã® Service Worker ãã¿ã¼ã³ã使ãããã API ã«ã¾ã¨ãã¦ãã¾ã。ãã®ã©ã¤ãã©ãªã®ãã¼ã¸ã§ã³ 3 ããªãªã¼ã¹ããã¦ããã®ã§、ã¢ã¸ã¥ã¼ã«ã«ãã«ããã¦、å¿
è¦ãªæ©è½ã®ã¿ã使ç¨ãããã¨ãã§ãã¾ã。
ããã°ã¬ãã·ã ã¦ã§ãã¢ããª(PWA)
Service Worker 㯠PWA ã®å¤ãã®æ©è½ãæ ¹åºããæ¯ãã¦ãã¾ã。ä¸çä¸ã®ãã¾ãã¾ãªæ¥ç¨®ã®ä¼æ¥ã、PWA ããã«ããã¦å¤§ããªæåãåãã¦ãã¾ã。PWA ãµã¤ããæ¨å¹´ããå
¬éãã¦ãã Starbucks ã§ã¯、æ¯æ¥ã®ã¢ã¯ãã£ã ã¦ã¼ã¶ã¼ã®æ°ã 2 åã«å¢ãã¾ãã。å®é、Google ãè¨æ¸¬ããã¢ããã¿ã¤ã¸ã³ã° ãµã¤ãã§ã¯、
ãµã¤ãã PWA ã«ç§»è¡ããå¾、ã¢ãã¤ã« ã³ã³ãã¼ã¸ã§ã³çãå¹³åã㦠20% å¢å ãã¾ãã。
å¤ãã®åæ PWA ã¯ã¢ãã¤ã«ã«éç¹ãç½®ãã¦ãã¾ããã、ãã®ã¡ãªãã㯠PC ã«ãåºãã£ã¦ãã¾ã。Chrome ã§ã¯、PC ã« PWA ã「ã¤ã³ã¹ãã¼ã«」ããæ©è½ãéããªãæä¾ããã¾ã。ãµã¤ãã«ã¯ç¬èªã®ã¢ã¤ã³ã³ãä»ä¸ãã、ã¹ã¿ã³ãã¢ãã³ã®ã¦ã£ã³ãã¦ã§è¡¨ç¤ºããã¾ã。ã¾ã、ãã¼ã¸å
æ¤ç´¢、å
±æå¯è½ãª URL、Google Cast ã®ãµãã¼ããªã©、ã¦ã¼ã¶ã¼ããã©ã¦ã¶ã«æå¾
ããå¼·åãªæ©è½ãç¶æããã¾ã。I/O ã§ã¯、Spotify ããã¹ã¯ããã PWA ã¨ãã¦ãªããã¡ãã£ã¢ ã¨ã¯ã¹ããªã¨ã³ã¹ãã©ã®ããã«ãããã¤ãã¦ããããç´¹ä»ãã¾ãã。ãã¹ã¯ããã PWA ã®「ã¤ã³ã¹ãã¼ã«」ãµãã¼ãã¯、6 æä¸æ¬ã« ChromeOS ã® Chrome 67 ã«è¿½å ãã、ä»å¹´ä¸ã« Windows ããã³ macOS ã«ãå°å
¥ãããäºå®ã§ã。
WebAssembly
WebAssembly ã使ç¨ããã¨、C ã C++ ãªã©ã®è¨èªã§è¨è¿°ããã、é«ããã©ã¼ãã³ã¹ã®ä½ã¬ãã«ã³ã¼ããã¦ã§ããµã¤ãã§å®è¡ã、ã¦ã§ã ãã©ãããã©ã¼ã ä¸ã«ã¾ã£ããæ°ããã¯ã©ã¹ã®ã³ã³ãã³ããå±éãããã¨ãã§ãã¾ã。3 æã«、
Autodesk ã® AutoCAD ãã¼ã ã¯ã¦ã§ãèªä½ãããå¤ã 35 å¹´ã®æ´å²ãæã¤ã³ã¼ããã¼ã¹ãã³ã³ãã¤ã«ã、WebAssembly ã使ã£ã¦ãã©ã¦ã¶å
ã§ç´æ¥å®è¡ã§ããããã«ãã¾ãã。AutoCAD ã®æ©è½ããªã³ã¯ããããã、使ç¨ãã¦ãã端æ«ããªãã¬ã¼ãã£ã³ã° ã·ã¹ãã ã«é¢ä¿ãªã、ãã©ã¦ã¶å
㧠CAD å³é¢ãç´æ¥ç·¨éã§ããããã«ãªãã¾ãã。AutoCAD ã®ã¨ã³ã¸ãã¢ãªã³ã° ãã¼ã ã¯、åä¸ã® C++ ã³ã¼ããã¼ã¹ã使ç¨ãã¦、ãã¹ã¯ããã ãã¼ã ãå¤æ´ãå ããã¨ãã«、ã¦ã§ãã¢ããªã«ãç°¡åã«å¤æ´ãçµã¿è¾¼ããããã«ãã¾ãã。
ã³ã¼ãã移æ¤ããã、ç¬èªã®ã³ã¼ããè¨è¿°ãããããæ¹æ³ã«ã¤ãã¦ã¯、C ã©ã¤ãã©ãªã¨ DOM ã®é£æºã解説ãã¦ãã
WebAssembly ã³ã¼ãã©ããã覧ãã ãã。C ã§è¨è¿°ãããè¤éãªã©ã¤ãã©ãªã使ç¨ãã¦ããã、æ°ããã³ã¼ããã¯ãã¦ã§ã ãã©ãããã©ã¼ã ã«çµã¿è¾¼ãå¿
è¦ãããã、ã¾ã㯠Unity ã Unreal Engine ãªã©ã®ã¨ã³ã¸ã³ã使ç¨ãã¦ãããã©ããã«é¢ä¿ãªã、ã©ã®å ´åã§ã WebAssembly ã¯æç¨ã§ã。
Lighthouse
Lighthouse ã¯ã¦ã§ããµã¤ãã®å質ãåæããããã®ãã¼ã«ã§、ãµã¤ãã®ããã©ã¼ãã³ã¹ã測å®ã、ã¦ã¼ã¶ã¼ ã¨ã¯ã¹ããªã¨ã³ã¹ãæ¹åããããã®ã¬ã¤ãã³ã¹ãæä¾ãã¾ã。Lighthouse ã¯、Chrome ã® DevTools å
ããç´æ¥ã¢ã¯ã»ã¹ã§ããã»ã、ã³ãã³ãã©ã¤ã³ããå®è¡ããã、ä»ã®éçºãã¼ã«ã¨çµ±åãããã§ãã¾ã。2018 å¹´ã ãã§、50 ä¸äººã®ãããããã¼ããµã¤ãã«å¯¾ã㦠Lighthouse ãå®æçã«å®è¡ãã¦ãã¾ã。Google ã¯ã¦ã§ãã®å¤åãéããã¨ãèªèãã¦ãã¾ã。Lighthouse ã使ç¨ããã¨、ããã©ã¼ãã³ã¹ã«é¢ããææ°ã®ãã¹ã ãã©ã¯ãã£ã¹ã常ã«ææ¡ã§ãã¾ã。I/O ã§çºè¡¨ããã Lighthouse 3.0 ã¯ãã§ã«ä¸è¬å
¬éããã¾ãã。
Lighthouse ã«ãã、å¶å¾¡ãããç°å¢ã§ãµã¤ãã®èªã¿è¾¼ã¿ããã©ã¼ãã³ã¹ãæ確ã«ææ¡ã§ããããã«ãªãã¾ã。ãã ã、ç¾å®ä¸çã®å®éã®ã¦ã¼ã¶ã¼ã«å¯¾ãããµã¤ãã®ããã©ã¼ãã³ã¹ãç¥ãå¿
è¦ãããå ´åã¯、
Chrome ã¦ã¼ã¶ã¼ ã¨ã¯ã¹ããªã¨ã³ã¹ ã¬ãã¼ããã覧ãã ãã。ãã®ã¬ãã¼ãã§ã¯、æãã¢ã¯ã»ã¹ãå¤ã 400 ä¸ã®ã¦ã§ããµã¤ãã«ã¤ãã¦ãªãªã¸ã³ã¬ãã«ã®ããã©ã¼ãã³ã¹ææ¨ãæä¾ããã¾ã。ãããã®ãã¼ã«ããã®ä»ã®ãã¼ã«ã§ãµã¤ãã®ããã©ã¼ãã³ã¹ãå
æ¬çã«ç¢ºèªããæ¹æ³ã®è©³ç´°ã«ã¤ãã¦ã¯、
ã¹ãã¼ããã¼ã«ã®ã¤ã³ãã©ã°ã©ãã£ãã¯ãã覧ãã ãã。
AMP
AMP ã¯、ãã¾ãã¾ãªåªããã¦ã¼ã¶ã¼ ã¨ã¯ã¹ããªã¨ã³ã¹ãåããä¿¡é ¼æ§ã®é«ãé«éã®ã¦ã§ããµã¤ãããã«ãããããã® Web Component ã©ã¤ãã©ãªããã³ã¨ã³ã·ã¹ãã ã§ã。
ç¾å¨、4600 ä¸åã®ãã¡ã¤ã³ã« 60 å以ä¸ã® AMP ãã¼ã¸ããã、Google æ¤ç´¢ããã®ãã¼ã¸èªã¿è¾¼ã¿æéã®ä¸å¤®å¤ã¯ 1 ç§æªæºã§ã。ä¼æ¥ã¯ AMP ãæ´»ç¨ãã¦æåãåãã¦ãã¾ã。ãã¨ãã°、ä¸çè¦æ¨¡ã®ãªã³ã©ã¤ã³å°å£²ããã¼ã±ãããã¬ã¤ã¹ã§ãã
AliExpress ã¯、AMP ãæ´»ç¨ããããã°ã¬ãã·ã ã¦ã§ãã¢ããªã¨ãã¦æ°ããã¢ãã¤ã«ãµã¤ããæè¿å
¬éãã¾ãã。
ãã®æ°ãããµã¤ãã§ã¯、éæ¤ç´¢ãã©ãã£ãã¯ã®ã³ã³ãã¼ã¸ã§ã³çã 31% ãå¢å ãã¾ãã。
ã¢ãã¤ã«ã§ã³ã³ãã³ããæ¶è²»ããæ¹æ³ã¯å¤åãç¶ãã¦ãã、å
¨ç»é¢ã§çãã¹ãã¼ãªã¼ãé
ä¿¡ããæ¹å¼ã®äººæ°ãã¾ãã¾ãé«ã¾ã£ã¦ãã¾ã。AMP ããã¸ã§ã¯ãã§ã¯、ãµã¤ããªã¼ãã¼ã®ãã¼ãºãæºãããã、ã¢ãã¤ã«ãã¡ã¼ã¹ãã®ã¹ãã¼ãªã¼é
ä¿¡ç¨ã«ãã«ããããè±å¯ãªã¦ã§ã ã³ã³ãã¼ãã³ãã§ãã
AMP ã¹ãã¼ãªã¼ã®éçºãæè¿çºè¡¨ãã¾ãã。ãã®ãã©ã¼ãããã®éçºã¯ç¶ç¶ä¸ã§ãã、ãããããã¼ã®çããã«ã¯、
ç¬èªã®ã¹ãã¼ãªã¼ããã«ããã¦ã¿ããã¨ããããããã¾ã。AMP ãã¼ã ã¯、ãããããã¼ã®çããããã®ãã£ã¼ãããã¯ããå¾
ã¡ãã¦ãã¾ã。
Web Packaging
Web Packaging ã¯ä¸é£ã®æ°ãããã¯ããã¸ã¼ã§ãã、Google ã§ã¯、ã¦ã§ã ã³ã³ãã³ããã¦ã§ãã«é
å¸ããã¦、ã¦ã¼ã¶ã¼ã«å
±æãããæ¹æ³ã Web Packaging ã«ãã£ã¦åå®ç¾©ãããã ããã¨èãã¦ãã¾ã。Web Packaging ã使ç¨ããã¨、ãµã¤ããªã¼ãã¼ã¯、HTTPS ã®æ´åæ§ä¿è¨¼ãç¶æããªãã、ä»ã®ãã¼ãã£ããé
å¸ãããã³ã³ãã³ãããã³ãã«ãããã¨ãã§ãã¾ã。Web Packaging ã«ãã£ã¦å¯è½ã«ãªã
æ°ããã¦ã¼ã¹ã±ã¼ã¹ãæ¢ã£ã¦ããã¨ãã«、AMP ã«ã¯èå³æ·±ã使ç¨æ¹æ³ããããã¨ã«æ°ã¥ãã¾ãã。AMP ãã¼ã ããã³ã¦ã§ã ã³ãã¥ããã£ã¨ã®é£æºãéãã¦、AMP ããã¥ã¡ã³ãã AMP ãã£ãã·ã¥ããæä¾ãããéã«ãµã¤ããªã¼ãã¼ã®å
ã® URL ãä¿æã§ããã½ãªã¥ã¼ã·ã§ã³ãè¨è¨ãããã¨ãã§ãã¾ãã。
ç§ãã¡ã®åãçµã¿ã示ããã®ã¨ãã¦、AMP ããã¸ã§ã¯ãã®ååä¼æ¥ã§ãã
Food Network ã¨
Pinterest ã¯、以ä¸ã®ãã㪠Web Packaging ã®ãã¢ãä½æãã¦ãã¾ã。ããã«è©³ããç¥ãããæ¹ã®ããã«、AMP ãã¼ã ã¯、Web Packaging ãã¦ã¼ã¶ã¼ã¨ãµã¤ããªã¼ãã¼ã«ã©ã®ãããªã¡ãªããããããããã«ã¤ãã¦、
ãã¡ãã®è¨äºã§è©³ãã説æãã¦ãã¾ã。AMP ã¢ããªã±ã¼ã·ã§ã³ã«å ãã¦、Web Packaging ãã¯ããã¸ã¼ãå¯è½ã«ããæªæ¥ã«æå¾
ããã¨ã¨ãã«、ãããããã¼ããã®æ¯æ´ãéãã¦æ§æ³ãæ´ç·´ããã¦ãããã¨ã楽ãã¿ã«ãã¦ãã¾ã。
Google æ¤ç´¢ããèªã¿è¾¼ã¾ãã AMP ãã¼ã¸ã§ã¦ã§ã ããã±ã¼ã¸ã³ã°ã使ç¨ãã¦ãããã¢
Polymer
Polymer ã¨ã¯、åå©ç¨å¯è½ãªã«ã¹ã¿ã Web Component ãä½æãã¦、ä»ã®ãããããã¼ã¨å
±æããã、ãã®ã³ã³ãã¼ãã³ããçµã¿åããã¦é«æ§è½ãªã¡ã³ããã³ã¹æ§ã®é«ãã¢ããªããã«ããããã§ããããã«ãã JavaScript ã©ã¤ãã©ãªã§ã。I/O ã§ã¯、ãã®ã©ã¤ãã©ãªã®ãã¼ã¸ã§ã³ 3.0 ãçºè¡¨ãã¾ãã。ããã«ãã、Polymer ã¨ã³ã·ã¹ãã ã大å¹
ã«ã¢ããã°ã¬ã¼ãããã¦ãã¾ã。ããã±ã¼ã¸ç®¡çã·ã¹ãã ã¨ã㦠NPM ã、ããã¦æ§æåä½ã¨ã㦠ES6 ã¢ã¸ã¥ã¼ã«ã使ç¨ããããã®ãµãã¼ããå
¨é¢çã«æä¾ããããã、Polymer ãã¼ã¹ã® Web Component ãä»ã®ãæ°ã«å
¥ãã®ã¦ã§ãéçºãã¼ã«ããã¬ã¼ã ã¯ã¼ã¯ã¨ç°¡åã«ä½µç¨ã§ããããã«ãªãã¾ãã。
ã¾ã、Web Component ã®æ°ããåºæ¬ã¯ã©ã¹ã§ãã
LitElement ãå°å
¥ããã¾ãã。ãã®ã¯ã©ã¹ã§ã¯、
Lit-HTML ã®è¡¨ç¾å㨠Web Component ãçµã¿åããã、ææ°ã®è¡¨ç¾åã®é«ããã³ãã¬ã¼ãæ§æã使ç¨ãã¦è»½éã®ãªã¢ã¯ãã£ã ã³ã³ãã¼ãã³ããä½æãããã¨ãããç°¡åã«ãªã£ã¦ãã¾ã。
Web Component é§ååã® PWA ããã«ãããããã®å
æ¬çãªéå§ç¹ã¨ãªã
PWA Starter Kit ããªãªã¼ã¹ãã¾ãã。ãããã® PWA ã¯、é«éã§ä¿¡é ¼æ§ã¨å¿çæ§ãé«ã、ãã¼ãè¨å®ãå¯è½ã§ãã、Lighthouse PWA ããã³ããã©ã¼ãã³ã¹åºæºã«ããã¦æé«ç¹ãç²å¾ãã¦ãã¾ã。
Angular
ä»å¹´ã® I/O ã§、Angular ãã¼ã ã¯ã³ãã¥ããã£ã®æé·ã«é¢ããæ¦è¦ãçºè¡¨ã、
ã³ã¢ ãã¬ã¼ã ã¯ã¼ã¯、CLI、ããã³ãã¼ã¸ã§ã³ 6 ã® Angular ãããªã¢ã« ã©ã¤ãã©ãªã«è¿½å ããããã°ãããæ°æ©è½ãããã¤ãç´¹ä»ãã¾ãã。Angular ã¯ä½ç¾ä¸äººãã®ãããããã¼ã«ãã£ã¦ä½¿ç¨ããã¦ãã、大ããªæ¨é²åãå¾ã¦、ãã°ãããã¨ã³ã·ã¹ãã ãæ§ç¯ããã¦ãã¾ã。「ng update」ã「ng add」ãªã©、ãã¼ã¸ã§ã³ 6 ã§ãªãªã¼ã¹ãããæ°ããã³ãã³ãã使ç¨ããã¨、ã¢ããªã±ã¼ã·ã§ã³ãææ°ã®ç¶æ
ã«ç¶æã§ããã»ã、Angular ãã¼ã ã«ãã£ã¦å¼ãç¶ãå®å®æ§ã¨é©æ°ã®ãã©ã³ã¹ãä¿ããããã、ãããããã¼ã¯éçºãå éããããã¨ãã§ãã¾ã。
ã¾ã、Angular ãã¼ã ã¯、
Project Ivy 㧠Angular ã«å ããããããã¤ãã®æ¹åç¹ãå°ãã ãç´¹ä»ãã¾ãã。ãããã®æ¹åã«ãã、Angular ã§ã¯æ¢åã®ã¢ããªã±ã¼ã·ã§ã³ã¨é£æºããªãã、ãããã°ãç°¡åã«ãªã、ã³ã³ãã¤ã«ããã³å®è¡ãããã«é«éåããã¾ã。ãã¼ã ã¯、å°ã㪠Hello World ã¢ããªã±ã¼ã·ã§ã³ã®å½¢å¼ã§ãããã®æ¹åã®ã¦ã¼ãã£ãªãã£ãç´¹ä»ã、使ç¨ãããªã Angular æ©è½ãã¢ããªã±ã¼ã·ã§ã³ã® JavaScript ãã³ãã«ããèªåçã«åé¤ããããã¨ã示ãã¾ãã。
Google ããã³ Chrome ã®ããã·ã§ã³ã¯、ã³ãã¥ããã£ã¨ååãã¦、çµ±åãããé«éãã¤ä¿¡é ¼æ§ã®é«ãé
åçãªã¨ã¯ã¹ããªã¨ã³ã¹ãæ§ç¯ãããã¨ã§ã。ãªã¼ãã³ ã¦ã§ã ãã©ãããã©ã¼ã ã«ãªã£ãæ°ããå¼·åãªæ©è½ã¨、ã¦ã¼ã¶ã¼åãã«é«å質ã®ãµã¤ãããã°ããä½æã§ããããã«ããå
æ¬çãªä¸é£ã®ãã¼ã«ã«å¤§ããªæå¾
ãå¯ãã¦ãã¾ã。ã¦ã§ãã®ææ°ã®é²åã«é¢ããæ
å ±ã確èªããã«ã¯、
ãããããã¼ ãã¼ã¿ã«ã«ã¢ã¯ã»ã¹ããã、
Google Developers YouTube ãã£ã³ãã«ã§ä»å¹´ã® I/O ã®åç»ãã覧ãã ãã。ä»å¹´ã®å¾åã«éå¬ããã
Chrome Dev Summit ã§ãããããã¼ã®çããã¨ãä¼ãããã®ã楽ãã¿ã«ãã¦ãã¾ã。
Reviewed by
Eiji Kitamura - Developer Relations Team