ES6 Generators On Koa.js Example

  • Published on
    21-Jan-2018

  • View
    57

  • Download
    6

Embed Size (px)

Transcript

  1. 1. ES6 KOA.JS Senior Front-end Developer, DataArt 14 2016
  2. 2. . . (Redux, Koa) koa.js . Async Await koa.js 2.x 14 2016 E S 6 K O A . J S 3
  3. 3. ECMAScript 2015 14 2016 E S 6 K O A . J S 4
  4. 4. , (iterable) Symbol.iterator 14 2016 E S 6 K O A . J S 5
  5. 5. 14 2016 E S 6 K O A . J S 6
  6. 6. 14 2016 E S 6 K O A . J S 7
  7. 7. 14 2016 8 Node.js 5 Callback Hell 5
  8. 8. JS 12 August 2016
  9. 9. 14 2016 E S 6 K O A . J S 10
  10. 10. 14 2016 E S 6 K O A . J S 11 Promise
  11. 11. 14 2016 E S 6 K O A . J S 12
  12. 12. next() , value done 14 2016 E S 6 K O A . J S 13
  13. 13. 14 2016 14 0,3346 0,3242 0,2851 0,6628 0,777 0,6085 0 0,2 0,4 0,6 0,8 1 Generators Promises Callbacks Firefox Chrome
  14. 14. 14 2016 E S 6 K O A . J S 15
  15. 15. redux-saga , impure , 14 2016 E S 6 K O A . J S 16
  16. 16. redux-saga 14 2016 E S 6 K O A . J S 17
  17. 17. redux-saga 14 2016 E S 6 K O A . J S 18
  18. 18. redux-saga (Sagas) Actions, sagaMiddleware , sagaMiddleware , middleware store. 14 2016 E S 6 K O A . J S 19
  19. 19. 14 2016 20
  20. 20. koa.js node.js node.js ES6 , ES2016. node.js express.js 14 2016 E S 6 K O A . J S 21
  21. 21. MIDDLEWARE KOA.JS 12 August 2016
  22. 22. koa.js Middleware 14 2016 E S 6 K O A . J S 23
  23. 23. koa.js co.js 14 2016 E S 6 K O A . J S 24
  24. 24. koa.js 14 2016 E S 6 K O A . J S 25 Middleware HTTP Koa + - - - Express + + + + Connect + - - -
  25. 25. koa.js Koa-cors koa-route koa-jwt JWT . koa-bodyparse koa-send 14 2016 E S 6 K O A . J S 26
  26. 26. koa.js 14 2016 E S 6 K O A . J S 27
  27. 27. koa.js 2 ? 14 2016 E S 6 K O A . J S 28
  28. 28. Async functions Async Promise. Await Promise. 14 2016 E S 6 K O A . J S 29
  29. 29. Async functions C 14 2016 E S 6 K O A . J S 30
  30. 30. Async functions ( , ). , . 14 2016 E S 6 K O A . J S 31
  31. 31. 14 2016 E S 6 K O A . J S 32
  32. 32. 14 2016 E S 6 K O A . J S 33 https://www.b17.ru/foto/uploaded/f3617e15cc29ca89af 0d7e37e790d1b9.jpg http://drawi.ru/pict/158576 http://rus.tvnet.lv/showbiz/kultura/251662- gjeroi_populjarnogo_multsjeriala_kot_ljeopold_jedut_ v_rigu https://developer.mozilla.org/ru/
  33. 33. 14 2016 34 https://www.facebook.com/tryshchenko ensaierwa@gmail.com