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

Evolution of Electron - NodeFest 2016

Dc13d329db98a4ff44d52013b80e3bf4?s=47 Cheng Zhao
November 13, 2016

Evolution of Electron - NodeFest 2016

Dc13d329db98a4ff44d52013b80e3bf4?s=128

Cheng Zhao

November 13, 2016
Tweet

Transcript

  1. EVOLUTION OF ELECTRON NODEFEST 2016

  2. EVOLUTION OF ELECTRON WHO AM I ▸ 摼౮ / Cheng

    Zhao / υϰη̴ώδЀ ▸ Creator of Electron framework ▸ Working at GitHub ▸ GitHub: https://github.com/zcbenz
  3. EVOLUTION OF ELECTRON Electron was born because of Atom editor.

  4. EVOLUTION OF ELECTRON FIRST EDITION OF ATOM EDITOR ▸ A

    simple Cocoa app with embedded webview ▸ Only works on Mac OS X ▸ Native abilities were provided by writing bindings to Cocoa webview
  5. EVOLUTION OF ELECTRON CEF BASED ATOM EDITOR ▸ The native

    layer was rewritten with CEF (Chromium Embedded Framework) ▸ Native abilities were provided by writing V8 bindings ▸ Used Chromium for rendering ▸ Possibility to run on all platforms
  6. EVOLUTION OF ELECTRON Then Node.js was getting popular.

  7. EVOLUTION OF ELECTRON PORT ATOM EDITOR TO NODE-WEBKIT ▸ Use

    Node.js and node-webkit APIs in Atom editor ▸ Port custom bindings to Node.js native modules ▸ This try failed
  8. EVOLUTION OF ELECTRON WHY THE TRY TO USE NODE-WEBKIT FAILED

    ▸ node-webkit crashed a lot ▸ It was hard to convert all of Atom’s code at once ▸ node-webkit lacked lots of features
  9. EVOLUTION OF ELECTRON WHY THE TRY TO USE NODE-WEBKIT FAILED

    ▸ node-webkit crashed a lot ▸ It was hard to convert all of Atom’s code at once ▸ node-webkit lacked lots of features SOLUTION: ▸ Hire the maintainer (me) to improve node-webkit ‣ Use a more progressive way to port Atom to node-webkit.
  10. EVOLUTION OF ELECTRON NEW PLAN FOR MIGRATING ATOM TO NODE-WEBKIT

    CEF-based Atom Editor Add Node.js integration to CEF Atom Editor using Node.js Migrate Atom to use Node.js APIs Improve node-webkit Atom Editor running on node-webkit
  11. EVOLUTION OF ELECTRON WHEN TRYING TO IMPROVE NODE-WEBKIT ▸ The

    architecture of node-webkit was not suitable for multi-windows apps ▸ The node-webkit project was more personal project than organization
  12. EVOLUTION OF ELECTRON We need to rewrite node-webkit.

  13. EVOLUTION OF ELECTRON NEW PLAN FOR MIGRATING ATOM TO NODE-WEBKIT

    CEF-based Atom Editor Atom Editor using Node.js Improve node-webkit Atom Editor running on node-webkit Write atom-shell atom-shell ATOM-SHELL Add Node.js integration to CEF Migrate Atom to use Node.js APIs
  14. EVOLUTION OF ELECTRON THE DIFFERENCES BETWEEN ATOM-SHELL AND NODE-WEBKIT ▸

    Allows running JavaScript in the main process ▸ No longer requires a powerful machine to build ▸ Changes node integration implementation to improve stability
  15. EVOLUTION OF ELECTRON THE DIFFERENCES BETWEEN ATOM-SHELL AND NODE-WEBKIT ▸

    Allows running JavaScript in the main process ▸ No longer requires a powerful machine to build ▸ Changes node integration implementation to improve stability IN SUMMARY: ▸ Better design ‣ Friendly to contributors
  16. EVOLUTION OF ELECTRON ATOM-SHELL / ELECTRON TIMELINE 2013 atom-shell started

    2014 atom-shell open sourced 2015 renamed to Electron 2016 Electron 1.0
  17. EVOLUTION OF ELECTRON STARS ON GITHUB (0 TO 37607)

  18. EVOLUTION OF ELECTRON WE HAVE LOTS OF CONTRIBUTORS ▸ 25

    community maintainers ▸ 492 contributors ▸ Half of the changes in recent releases were from contributors ▸ (by Nov 6, 2016)
  19. EVOLUTION OF ELECTRON ELECTRON TEAM GROWS

  20. EVOLUTION OF ELECTRON HOW ELECTRON GROWS One major developer More

    users More maintainers More contributors
  21. EVOLUTION OF ELECTRON HOW ELECTRON GROWS One major developer More

    users More maintainers More contributors Key for growth More contributors
  22. EVOLUTION OF ELECTRON KEEP ATTRACTING CONTRIBUTORS ▸ Being responsive to

    issues and pull requests ▸ isitmaintained.com ▸ Make development easier ▸ bootstrap script ▸ Code review ▸ Refactor code for better readability ▸ …
  23. THANK YOU