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

Head topics in Javascript, 2020

Head topics in Javascript, 2020

Jimmy Moon

April 03, 2020
Tweet

More Decks by Jimmy Moon

Other Decks in Programming

Transcript

  1. ૑Ә! ੗߄झ௼݀౟ ೞ
    ۰ݶ ঌইঠ ೡ Ѫٜ
    Head topics in Javascript, 2020

    View full-size slide

  2. ੗߄झ௼݀౟
    Javascript

    View full-size slide

  3. One of Most Popular Programming
    Languages

    View full-size slide

  4. https://octoverse.github.com/

    View full-size slide

  5. TIOBE programming community index is a measure of popularity of programming languages

    View full-size slide

  6. Javascript is running on
    many where

    View full-size slide

  7. https://en.wikipedia.org/wiki/JavaScript
    Initially only implemented client-side in
    web browsers, JavaScript engines are now
    embedded in many other types of host
    software, including server-side, databases,
    and in non-web programs, mobile and
    desktop applications.

    View full-size slide

  8. https://en.wikipedia.org/wiki/JavaScript
    Initially only implemented client-side in web
    browsers, JavaScript engines are now
    embedded in many other types of host
    software, including server-side, databases,
    and in non-web programs, mobile and
    desktop applications.

    View full-size slide

  9. https://en.wikipedia.org/wiki/JavaScript
    Initially only implemented client-side in web
    browsers, JavaScript engines are now
    embedded in many other types of host
    software, including server-side, databases,
    and in non-web programs, mobile and
    desktop applications.

    View full-size slide

  10. Community Driven Language

    View full-size slide

  11. ECMAScript/ES 20XX

    View full-size slide

  12. ECMAScript/ES 20XX
    ==
    Javascript/JS

    View full-size slide

  13. https://en.wikipedia.org/wiki/JavaScript
    In November 1996, Netscape submitted JavaScript to ECMA International to carve out a
    standard specification, ... ECMAScript published in the first edition of the ECMA-262 standard
    in June 1997, ECMAScript 2 in June 1998, The release of ECMAScript 3 followed in December
    1999, by 2003, the original ECMAScript 4 work was mothballed. The development of
    ECMAScript 4 was never completed. ... Alas, there was still turmoil between the various
    players ... While all of this was happening, the open source and developer communities set to
    work to revolutionize what could be done with JavaScript, in early 2009 to rename ECMAScript
    3.1 to ECMAScript 5 and drive the language forward using an agenda that is known as
    Harmony. ECMAScript 5 was finally released in December 2009. In June 2011, ECMAScript
    5.1 was released to fully align with the third edition of the ISO/IEC 16262 international
    standard. ECMAScript 2015 was released in June 2015. ECMAScript 2016 was released in
    June 2016. The current version is ECMAScript 2017, released in June 2017

    View full-size slide

  14. https://en.wikipedia.org/wiki/JavaScript
    In November 1996, Netscape submitted JavaScript to ECMA International to carve out a
    standard specification, ... ECMAScript published in the first edition of the ECMA-262 standard
    in June 1997, ECMAScript 2 in June 1998, The release of ECMAScript 3 followed in December
    1999, by 2003, the original ECMAScript 4 work was mothballed. The development of
    ECMAScript 4 was never completed. ... Alas, there was still turmoil between the various
    players ... While all of this was happening, the open source and developer communities set to
    work to revolutionize what could be done with JavaScript, in early 2009 to rename ECMAScript
    3.1 to ECMAScript 5 and drive the language forward using an agenda that is known as
    Harmony. ECMAScript 5 was finally released in December 2009. In June 2011, ECMAScript 5.1
    was released to fully align with the third edition of the ISO/IEC 16262 international standard.
    ECMAScript 2015 was released in June 2015. ECMAScript 2016 was released in June
    2016. The current version is ECMAScript 2017, released in June 2017

    View full-size slide

  15. Stage 0: Strawman, submitting ideas and review
    Stage 1: Proposal, formal proposal for the feature
    Stage 2: Draft, first version of what will be in the specification
    Stage 3: Candidate, the proposal is mostly finished
    Stage 4: Finished, the proposal is ready to be included in the standard
    ECMAScript/ES 20XX

    View full-size slide

  16. Compiling, to Javascript

    View full-size slide

  17. - TypeScript: TypeScript is a superset of
    JavaScript that compiles to clean JavaScript
    output
    - ReasonML: Simple, fast & type safe code that
    leverages the JavaScript & OCaml ecosystems
    - PureScript: A strongly-typed language that
    compiles to Javascript, written in and inspired by
    Haskell
    - ClosureScript, Elm
    ClojureScript

    View full-size slide

  18. - Superset of JavaScript that brings users
    optional static types and solid tooling
    - Designed for development of large
    applications and transcompiles to JavaScript
    - Maintained by Microsoft, Backed by Google
    (Angular and other project)
    - Support in many mature IDEs
    - Annotations and Compile-time type
    checking, Interfaces, Enumerated, Generics,
    Namespaces, Tuples, Async/await, Classes
    Modules ...

    View full-size slide

  19. ࠳ۄ਋੷
    Browsers

    View full-size slide

  20. Browser, the platform for Web
    Applications

    View full-size slide

  21. Blink
    V8
    Webkit
    Nitro
    Gecko(Quantum)
    Spidermonkey
    Blink
    V8
    Blink
    V8
    Blink
    V8

    View full-size slide

  22. Web Assembly (aka, WASM)

    View full-size slide

  23. Javascript
    Source Code Ignition
    (JS Interpreter)
    TurboFan
    (Optimization Compiler)
    Deoptimize
    Optimize
    (Profile Data)
    Bytecode
    Optimized
    Code
    Collecting
    Information
    Profiling
    Data

    View full-size slide

  24. Liftoff
    (WebAssembly baseline compiler)
    Hot Swap
    Execution
    Immediately
    WASM
    TurboFan
    (Optimization Compiler)
    Off-thread
    Optimization

    View full-size slide

  25. https://developers.google.com/web/updates/2019/02/hotpath-with-wasm

    View full-size slide

  26. SharedArrayBuffer
    Threads
    Worker
    CPU Core
    WASM Instance
    Worker
    CPU Core
    WASM Instance
    Worker
    CPU Core
    WASM Instance
    https://www.youtube.com/watch?v=kZrl91SPSpc
    atomic.wait
    atomic.notify

    View full-size slide

  27. Threads in C
    https://github.com/ragingwind/wasm-hello-world/tree/master/clang-thread

    View full-size slide

  28. https://medium.com/google-earth/performance-of-web-assembly-a-thread-on-threading-54f62fd50cf7
    Threads

    View full-size slide

  29. SIMD
    Single Instruction, Multiple Data

    View full-size slide

  30. https://hacks.mozilla.org/2019/08/webassembly-interface-types/

    View full-size slide

  31. Web Audio / Midi
    https://ryoyakawai.com/blog/2015/07/27/webmusic-hackathon-kyoto-en.html

    View full-size slide

  32. https://developer.mozilla.org/en-US/docs/Web/API/WebXR_Device_API

    View full-size slide

  33. Web Capabilities (aka, Fugu)

    View full-size slide

  34. https://goo.gle/fugu-api-tracker

    View full-size slide

  35. য೒ܻா੉࣌
    Applications

    View full-size slide

  36. https://roadmap.sh/frontend

    View full-size slide

  37. Workflow, whole development
    process of Javascript Application

    View full-size slide

  38. Init Dev Build Deploy

    View full-size slide

  39. Framework, is a starting point, not a
    goal

    View full-size slide

  40. REACT
    NEXT.JS
    VUE.JS
    NUXT.JS
    PREACT ANGULAR EMBER
    (GLIMMER)
    GOOD OPTIONS WITH WORKFLOW
    SVELTE

    View full-size slide

  41. https://npmcharts.com/compare/react,angular,@angular/core,ember-cli,vue,@polymer/polymer,next,nuxt,preact

    View full-size slide

  42. - Best practices built with the framework
    - Zero configuration tooling
    - Customizable configs
    - Exporting static files
    - PWA supports
    - Optimized performance
    - Tutorials, books and videos for learning
    - Developer Experience

    View full-size slide

  43. Data Management, manage multiple
    pieces of state scattered across
    many components

    View full-size slide

  44. https://facebook.github.io/flux/docs/in-depth-overview.html
    State Management, Flux

    View full-size slide

  45. https://www.jahia.com/about-us/news-events/blog/introduction-to-graphql
    GraphQL

    View full-size slide

  46. Packages Manager

    View full-size slide

  47. Bundling, tighten up your application
    for serving in production-ready
    version

    View full-size slide

  48. https://speakerdeck.com/addyosmani/fast-by-default-modern-loading-best-practices

    View full-size slide

  49. Tools, Editing, Debugging, Auditing
    and Testing

    View full-size slide

  50. https://next-hnpwa.now.sh/
    LIGHTHOUSE

    View full-size slide

  51. LIGHTHOUSE SCORE

    View full-size slide

  52. - Unit testing
    - E2E testing
    - UI Testing (Component)
    - Browser-side testing

    View full-size slide

  53. https://twitter.com/malweene/status/1177271711806427136/photo/1

    View full-size slide

  54. ࢲߡ-ࢎ੉٘
    Server-Side

    View full-size slide

  55. - Node(node, Node.js)
    - V8 Engine for running Javascript out of
    browser
    - Light, fast, running on cross-platforms
    - Asynchronous I/O via libuv
    - Event-driven and Non-blocking I/O
    - Strong community, Node foundation and npm
    - Isomorphic (Universal) JavaScript Application

    View full-size slide

  56. - Deno
    - Ryan Dahl, Same creator of Node
    - V8 Engine for running Javascript out of
    browser
    - Security, Security
    - Typescript
    - Simple Module System
    - Efficient Performance powered by Rust

    View full-size slide

  57. JAMStack, serving pre-rendering
    files directly from a CDN, removing
    the requirement to run web servers

    View full-size slide

  58. Building and deploying modern websites and apps - GitHub Universe 2019 - YouTube

    View full-size slide

  59. Building and deploying modern websites and apps - GitHub Universe 2019 - YouTube

    View full-size slide

  60. 1
    2
    3
    4
    5
    6
    https://github.com/sw-yx/smashingconf-ny-2019/blob/master/readme.md

    View full-size slide

  61. https://github.com/ragingwind/next-templates

    View full-size slide

  62. ݽ߄ੌҗ ؘझ௼఑
    Mobile and Desktop

    View full-size slide

  63. Mobile Web Application, web
    application with a first-class mobile
    experience

    View full-size slide

  64. - App like
    - Secure
    - Installable
    - Offline working
    - Notification
    - Discoverable
    - Device features
    Progressive
    Web Apps

    View full-size slide

  65. https://speakerdeck.com/addyosmani/fast-by-default-modern-loading-best-practices

    View full-size slide

  66. https://speakerdeck.com/addyosmani/fast-by-default-modern-loading-best-practices

    View full-size slide

  67. https://speakerdeck.com/addyosmani/fast-by-default-modern-loading-best-practices

    View full-size slide

  68. https://speakerdeck.com/addyosmani/fast-by-default-modern-loading-best-practices

    View full-size slide

  69. https://speakerdeck.com/addyosmani/fast-by-default-modern-loading-best-practices

    View full-size slide

  70. https://speakerdeck.com/addyosmani/fast-by-default-modern-loading-best-practices

    View full-size slide

  71. https://speakerdeck.com/addyosmani/fast-by-default-modern-loading-best-practices

    View full-size slide

  72. https://speakerdeck.com/addyosmani/fast-by-default-modern-loading-best-practices

    View full-size slide

  73. - Accelerated Mobile Pages
    - Cached by a CDN
    - Optimised for fast loading
    - Opinionated Components
    and HTML

    View full-size slide

  74. Native Mobile App, w/ Javascript

    View full-size slide

  75. React
    Native
    Native
    Script
    Vue
    Native
    Ionic
    (Angular)
    Flutter
    (Dart)

    View full-size slide

  76. ؘझ௼఑
    Desktop

    View full-size slide

  77. Electron
    Progressive
    Webapp

    View full-size slide

  78. Electron, the best way to make a
    desktop app in web technologies on
    multi-platform

    View full-size slide

  79. Practice on embedding Node.js into Atom Editor // Speaker Deck - https://goo.gl/ENyzp9

    View full-size slide

  80. PWA for Desktop

    View full-size slide

  81. https://developers.google.com/web/updates/2018/05/dpwa

    View full-size slide

  82. ੗߄झ௼݀౟ ೠߣ ೧
    ࠁࣁਃ
    Try it! Now!

    View full-size slide