O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Cross-Platform Desktop Apps with Electron (JSConf UY)

1.326 visualizações

Publicada em

Would you like to leverage your HTML, CSS, and JavaScript skills to build cross-platform desktop applications? Electron is an open source application shell created by GitHub, designed to make building great desktop applications easy. You may have already experienced Electron using applications such as Atom, Slack, or Visual Studio Code. In this talk, you will learn its features, how to quickly get started, and tips from my experience building Electron applications.

Publicada em: Tecnologia
  • Seja o primeiro a comentar

Cross-Platform Desktop Apps with Electron (JSConf UY)

  1. 1. Cross-Platform Desktop Apps with Electron David Neal | reverentgeek.com | @reverentgeek var trustMe = { has: ["Beard", "Motorcycle"], consumes: ["Bacon", "Caffeine"] };
  2. 2. Up Ahead • What is Electron? • Why desktop? • Crash course • Tips
  3. 3. .NET + Mono + Xamarin Pros: • Shared .NET code base Cons: • Xamarin Mac !== Xamarin iOS/Android • Native UI • Deployment • Licensing
  4. 4. Electron Pros: • HTML + CSS + JavaScript • Node.js + Chrome • No deployment dependencies
  5. 5. Electron Cons: • HTML + CSS + JavaScript • Seriously, JavaScript • Decisions, Decisions
  6. 6. Electron • Created by GitHub for Atom • Formerly Atom Shell • Active since January 2013
  7. 7. Electron Features • Rapid development • Themes • Shared code/UI • Deployment + “silent” updates • Native UX
  8. 8. Why Desktop Apps? • Offline • Printers, devices, other local hardware • On-premises • Internal, LOB • Edit local files • App Store • Kiosk • Desktop > Intranet • Sometimes it “just feels right”
  9. 9. Desktop App Ideas • Disconnected data entry • Editor • Time management • Media player • Email client • Messaging, collaboration • Kiosk • Mapping, route planner • Social media client • Calendar • Bulk media editor • File management, backup • Document generation, reading • Audio/video conferencing • Games
  10. 10. Atom
  11. 11. Nylas N1
  12. 12. > npm install electron-prebuilt > touch main.js > touch index.html
  13. 13. ( main.js )
  14. 14. ( main.js )
  15. 15. ( main.js ) ( index.html )
  16. 16. ( main.js ) ( home.html ) ( editor.html ) ( settings.html )
  17. 17. main.js
  18. 18. main.js
  19. 19. main.js
  20. 20. main.js
  21. 21. main.js
  22. 22. main.js
  23. 23. main.js
  24. 24. main.js
  25. 25. index.html
  26. 26. index.html > electron main.js
  27. 27. index.html
  28. 28. index.html
  29. 29. index.html
  30. 30. index.html
  31. 31. main.js
  32. 32. main.js
  33. 33. Process modules • app • ipc • dialog • menu, menu-item • power-monitor • tray
  34. 34. Renderer modules • ipc • remote • web-frame
  35. 35. Modules available to both • clipboard • crash-reporter • native-image • screen • shell
  36. 36. Recommended Tools • electron-debug • electron-reload • electron-packager • electron-builder • electron-updater • electron-mocha
  37. 37. Boilerplate Projects • electron-boilerplate • electron-react-boilerplate
  38. 38. electron-prebuilt-compile • ES6/ES7 (Babel), TypeScript, CoffeeScript • React.js • LESS • Jade • CSON
  39. 39. photonkit.com
  40. 40. Tips • Use CSS default cursor • -webkit-user-drag:none • -webkit-user-drag:text • Keep windows open
  41. 41. Resources https://github.com/sindresorhus/awesome-electron Pluralsight Course: Rob Conery’s “Electron Playbook”
  42. 42. Thank you! David Neal @ReverentGeek david@reverentgeek.com reverentgeek.com

×