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

Evolution of Electron - NodeFest 2016

Cheng Zhao
November 13, 2016

Evolution of Electron - NodeFest 2016

Cheng Zhao

November 13, 2016
Tweet

More Decks by Cheng Zhao

Other Decks in Programming

Transcript

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

    Zhao / υϰη̴ώδЀ ▸ Creator of Electron framework ▸ Working at GitHub ▸ GitHub: https://github.com/zcbenz
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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.
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. EVOLUTION OF ELECTRON ATOM-SHELL / ELECTRON TIMELINE 2013 atom-shell started

    2014 atom-shell open sourced 2015 renamed to Electron 2016 Electron 1.0
  13. 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)
  14. EVOLUTION OF ELECTRON HOW ELECTRON GROWS One major developer More

    users More maintainers More contributors Key for growth More contributors
  15. 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 ▸ …