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

ConnectTech 2017: Cross-Platform Desktop Apps w...

David Neal
September 22, 2017

ConnectTech 2017: Cross-Platform Desktop Apps with Electron

Would you like to leverage your web skills to build cross-platform desktop applications? Electron is an open-source solution designed to make building great desktop applications easy. In this talk, you will learn its features, how to quickly get started, and tips from my experience!

David Neal

September 22, 2017
Tweet

More Decks by David Neal

Other Decks in Programming

Transcript

  1. .NET + Mono + Xamarin Pros: • Shared .NET code

    base Cons: • Xamarin Mac !== Xamarin iOS/Android • Native UI is hard • Deployment • Licensing
  2. Electron Pros: • HTML + CSS + JavaScript • Node.js

    + Chromium • No deployment dependencies
  3. History • Created by GitHub for Atom • Formerly Atom

    Shell • Active since January 2013 • 1.0 release May 2016 • Current: 1.7.6 Aug 9th
  4. Electron Features • Rapid development • Themes • Shared code/UI

    • Deployment + “silent” updates • Native UX
  5. 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”
  6. 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
  7. Process modules • app • ipc • dialog • menu,

    menu-item • power-monitor • tray
  8. Deploying Electron • Phase 1: Copy Files • Phase 2:

    Compile to App • Phase 3: Build Installer • Phase 4: Automatic Updates
  9. Building for Windows • Windows 7/Server 2008 R2 minimum (https://dev.modern.ie)

    • Visual Studio 2015 Community • Python 2.7 • Node.js • Git
  10. Building for Mac • OS X 10.8+ • Xcode 5.1+

    • Node.js • pyobjc (only if using Python installed with Homebrew)
  11. Building for Linux • Python 2.7 • Node.js • Clang

    3.4+ • GTK+ & libnotify dev headers
  12. Tips • Use CSS default cursor • -webkit-user-drag:none • -webkit-user-drag:text

    • Keep windows open • Offload work to main over ipc