Upgrade to Pro — share decks privately, control downloads, hide ads and more …

2017年 WebFrontendの今後と変化への対応(社内向け)

2017年 WebFrontendの今後と変化への対応(社内向け)

Web Frontendは現在非常に変化が激しい業界です。
そこで今後どのような技術がトレンドになるか、
その変化にどうついていけばいいか
を社内向けに発表しました。

More Decks by Taketoshi Aono(青野健利 a.k.a brn)

Other Decks in Technology

Transcript

  1. せ⵸: @brn (ꫬꅿ⨳ⵃa.k.a ـٕ٦ظ) 耵噟: ؿٗٝزؒٝسؒٝآص،٥iOSؒٝآص، ⠓爡: Cyberagent ،سذؙأةآؔRightSegment٥AI Messenger

    ـؚٗ: http://abcdef.gets.b6n.ch/ Twitter: https://twitter.com/brn227 GitHub: https://github.com/brn
  2. Browser ServiceWorker Server fetch event fetch if no cache Caced

    response response Browser ServiceWorker install event waiting ⴱ㔐 ✳㔐湡⟃꣬
  3. import fs from 'fs'; import util from '../util'; import {

    Anything } from '../something'; export class MainClass { }
  4. async function request() {! return await fetch('https://ex.com/');! }! ! async

    function main() {! const result = await request();! const json = await result.json();! console.log(json);! }! ! main();!
  5. Client Server Client Server Client request style.css response style.css request

    index.js response index.js HTTP/1.1 Client Server1 Client request style.css request index.js response style.css response index.js HTTP/2.0
  6. PWA Progressive Web Application Progressive Web ApplicationהכծGoogleח״׏ג䲿㈖ׁ׸׋ ״׶،فٔٓ؎ؙזWeb،فٔ؛٦ءّٝךֿהדծ ServiceWorkerח״׷؝ٝذٝخٍؗحءُװApp Shellػة٦

    ٝ׾ⵃ欽׃׋鏣鎘׾遤ֲֿהדծ״׶넝鸞ד،فٔך״ֲח澓 儗חل٦آ׾邌爙ׅ׷ֿהָ〳腉חז׷կ 暴חApp Shellח꫼涸ז邌爙銲稆׾תה׭גServiceWorkerד Cacheׅ׷ֿהד㛇劤涸זٖ؎،ؐزָ澓儗ח圓眠ׁ׸׷״ֲ חז׷կ
  7. Endpoint 1 Endpoint 2 Endpoint 3 ServiceWorker Browser Content Server

    index.html Navigation Header Footer App shell Reuqest if not cached Precache other pages Get content Get cached content Minimum stable static content
  8. Foreign Fetch ServiceWorker׾3rd partyسً؎ٝOriginךٖأهٝأقحتח 䭷㹀ׅ׷ֿהדծ3rd PartyךService Workerָ涫ꐮדֹ׷կ ׁ׵ח3rd PartyךService Workerכⴽل٦آַ׵ؙٔؒأزׁ

    ׸ג׮ؙٔؒأز⯓ָずׄז׵לⱄⵃ欽ׁ׸׷կ תׁחًر؍،׾埆倖ׅ׷ծ䎢デ禸ךjavascriptةؚחֲ׏גא ֽך堣腉ד֮׷կ ׋׌׃ծת׌Origin Triralsזךד⢪ִזְָ…
  9. Ad Server Browser ServiceWorker Client A Media response header Link

    sw.js; rel="serviceworker" 3rd party ServiceWorker Client B Media
  10. async function wait(t) {! return new Promise(resolve => setTimeout(resolve, t))!

    }! async function* infinity() {! for (let i = 0;;i++) {! yield i;! }! }! ! async function main() {! for await (const count of infinity()) {! console.log(count);! await wait(1000);! }! }! ! main();!
  11. Component A html css javascript index.html <a-element> Shadow DOM <b-element>

    Shadow DOM <c-element> Shadow DOM Component A html css javascript Component A html css javascript
  12. 実装 All in one angularjs/vueך圫זׅץגך꬗⦜׾鋅 גֻ׸׷ؿٖ٦يٙ٦ؙ׾ⵃ欽ׅ׷կ •  CLIخ٦ٕ׮إحزחז׏גְגקה ׿ו꬗⦜׾鋅גֻ׸׷ךד嚂կ • 

    刿倜ׁ׸׋ꥷחת׷׏ה،حفر٦ز ׃זֽ׸לז׵זְךד穠圓鳞ְկ •  ְאתדًٝذׁ׸׷ַ♶僇 Incremental reactך圫ז⽃堣腉ٓ؎ـٓٔ׾穈׫ さ׻ׇג稢ַֻ،حفر٦زկ •  㥨ֹזػ٦خ׾穈׫さ׻ׇג穈׿דְ ֽ׷կ •  ،حفر٦زָ؎ًؙٝٔٝزחדֹ ׷ךד䕦갟׾䫇ִ׵׸׷կ •  荈ⴓד،٦ؗذؙثַٍ׵罋ִזֽ׸ לז׵זְկ •  ٓ؎ـٓٔך鋅噰׭ָ㣐㢌