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

Electron @ UW Nov 2015

benogle
November 20, 2015

Electron @ UW Nov 2015

benogle

November 20, 2015
Tweet

Other Decks in Programming

Transcript

  1. the best way to build and ship software Ben Ogle

    2 @benogle on github / twitter Work on Atom Engineer at GitHub Live in San Francisco
  2. the best way to build and ship software Atom 3

    Open Source Text Editor http://atom.io/ — https://github.com/atom/atom
  3. the best way to build and ship software Desktop App

    Power 6 Can access the file system Atom A Website Can access the clipboard Can adjust the menus Can load native modules Can integrate with the OS ! x Can access the file system Can access the clipboard Can adjust the menus Can load native modules Can integrate with the OS ! ! ! ! x x x x
  4. the best way to build and ship software Atom is

    built on Electron 7 Atom Electron http://electron.atom.io/ — https://github.com/atom/electron
  5. the best way to build and ship software What is

    Electron? 8 Atom Electron http://electron.atom.io/ — https://github.com/atom/electron
  6. the best way to build and ship software What is

    Electron? 9 JavaScript, HTML, and CSS Electron http://electron.atom.io/ — https://github.com/atom/electron Tool for building cross-platform native apps with web technology
  7. the best way to build and ship software What is

    Electron? 10 Electron http://electron.atom.io/ — https://github.com/atom/electron OS JavaScript, HTML, and CSS Tool for building cross-platform native apps with web technology
  8. the best way to build and ship software How does

    Electron work? 11 JavaScript, HTML, and CSS Chromium node.js Electron OS Electron = Chromium + node.js
  9. the best way to build and ship software Electron-based Text

    Editors 13 Microsoft Visual Studio Code GitHub Atom Facebook Nuclide
  10. the best way to build and ship software Electron-based Video

    Game Editor 15 Fireball - http://fireball-x.com/en/
  11. the best way to build and ship software Electron-based Chat

    Client 16 Slack (for Windows!) — https://slack.com/apps
  12. the best way to build and ship software Electron-based Emoji

    Searcher 17 Mojibar by @muan - https://github.com/muan/mojibar
  13. the best way to build and ship software More Examples

    18 https://electron.atom.io https://github.com/sindresorhus/awesome-electron
  14. the best way to build and ship software Lets Make

    an App! 19 Quick Start - https://github.com/atom/electron-quick-start git clone [email protected]:atom/electron-quick-start.git cd electron-quick-start npm install npm start
  15. the best way to build and ship software Anatomy of

    the electron-quick-start 20 Quick Start - https://github.com/atom/electron-quick-start
  16. the best way to build and ship software Anatomy of

    an Electron App 21 Main Process /src/main Renderer Process /src/renderer IPC Renderer Process /src/renderer Simple Sample - https://github.com/electronjs/electron-sample
  17. the best way to build and ship software Anatomy of

    the electron-quick-start 22 Quick Start - https://github.com/atom/electron-quick-start Main Process Renderer Process
  18. the best way to build and ship software Main Process

    is Master of Puppets 23 Main Process /src/main Renderer Process /src/renderer IPC Renderer Process /src/renderer Quick Start - https://github.com/atom/electron-quick-start
  19. the best way to build and ship software Main Process

    is Master of Puppets 24 Main Process /src/main Renderer Process /src/renderer IPC Renderer Process /src/renderer Start App Quick Start - https://github.com/atom/electron-quick-start
  20. the best way to build and ship software Main Process

    is Master of Puppets and Highlander 25 Main Process /src/main Renderer Process /src/renderer IPC Renderer Process /src/renderer Start App Quick Start - https://github.com/atom/electron-quick-start
  21. the best way to build and ship software Renderer process

    renders HTML/CSS 26 Main Process /src/main Renderer Process /src/renderer Renderer Process /src/renderer Start App new BrowserWindow(‘index.html’) Quick Start - https://github.com/atom/electron-quick-start
  22. the best way to build and ship software Renderer process

    renders HTML/CSS 27 Main Process /src/main Renderer Process /src/renderer Renderer Process /src/renderer Start App new BrowserWindow() new BrowserWindow() Quick Start - https://github.com/atom/electron-quick-start
  23. the best way to build and ship software Each window

    is a renderer process 28 Quick Start - https://github.com/atom/electron-quick-start Renderer Process Renderer Process
  24. the best way to build and ship software Processes can

    communicate via IPC IPC 29 Main Process /src/main Renderer Process /src/renderer Renderer Process /src/renderer Start App menuItemClicked() quit() Quick Start - https://github.com/atom/electron-quick-start
  25. the best way to build and ship software 31 Minimal

    main process code Quick Start - https://github.com/atom/electron-quick-start
  26. the best way to build and ship software 32 Minimal

    renderer process code Quick Start - https://github.com/atom/electron-quick-start
  27. the best way to build and ship software 33 Minimal

    renderer process code Quick Start - https://github.com/atom/electron-quick-start OMG node
  28. the best way to build and ship software 34 Now

    you can write an Electron app
  29. the best way to build and ship software The quick

    start does not… 35 Package your app for distribution Compile popular languages (Coffee, TypeScript, Babel, SCSS, Less) Help you test your app Properly install native modules Deal with auto updates
  30. the best way to build and ship software Community modules

    to the rescue! 36 electron-packager - Create .app and .exes electron-rebuild - Rebuild native modules electron-compile - Compile Coffee, etc to JS electron-jasmine - Test runner electron-mocha - Another test runner
  31. the best way to build and ship software Community modules

    to the rescue! 37 electron-packager - Create .app and .exes electron-rebuild - Rebuild native modules electron-compile - Compile Coffee, etc to JS electron-jasmine - Test runner electron-mocha - Another test runner But composing them into is hard
  32. the best way to build and ship software A more

    robust example 38 Sample - https://github.com/electronjs/electron-sample git clone [email protected]:electronjs/electron-sample.git cd electron-sample script/bootstrap script/run script/test script/build
  33. the best way to build and ship software Anatomy of

    the electron-sample 39 Sample - https://github.com/electronjs/electron-sample Main Process Renderer Process
  34. the best way to build and ship software KittyDetect 43

    Cat face detection demo - https://github.com/benogle/kitty-detect-app Uses the kittydar node module - https://github.com/harthur/kittydar
  35. the best way to build and ship software Curve App

    45 Open Source Vector Drawing tool — https://github.com/benogle/curve-app Download for Mac and Windows — https://github.com/benogle/curve-app/releases
  36. the best way to build and ship software Curve 46

    Open Source Vector Drawing library - https://github.com/benogle/curve
  37. the best way to build and ship software Step-by-step Curve

    tutorial 47 https://github.com/benogle/curve-basic
  38. the best way to build and ship software 49 Resources

    Samples Curve: Vector drawing tool — https://github.com/benogle/curve-app ; Step by step: https://github.com/benogle/curve-basic Atom — http://atom.io/ ; Repo: https://github.com/atom/atom Quick Start — https://github.com/atom/electron-quick-start Electron — http://electron.atom.io/ ; Repo: https://github.com/atom/electron KittyDetect: Cat face detection sample — https://github.com/benogle/kitty-detect-app Electron resources — https://github.com/sindresorhus/awesome-electron More samples of API usage — https://github.com/hokein/electron-sample-apps From the community Ben Ogle https://github.com/benogle [email protected] Basic Sample — https://github.com/electronjs/electron-sample