Lock in $30 Savings on PRO—Offer Ends Soon! ⏳

Build Cross Platform Desktop Application with E...

WM
October 04, 2015

Build Cross Platform Desktop Application with Electron

@JSDC.TW 2015

WM

October 04, 2015
Tweet

More Decks by WM

Other Decks in Technology

Transcript

  1. Desktop Factors •  Massive Assets (Game) •  Quick Typing (Messenger)

    •  Urgent Usage (Office) •  Frequent Access (Music) Show Logo to your user constantly 3
  2. Cross Platform Technology •  Java •  GTK+ / Qt •

     XULRunner •  Chrome Apps •  Chromium Embedded Framework CEF everywhere! 6
  3. History •  Started in January 2013 •  Built initially for

    the Atom text editor •  Renamed from atom-shell •  use libchromiumcontent and Brightray to wrap Chromium Content module 9
  4. require modules built-in modules and npm packages modules for main

    process and renderer process read module documentation 14
  5. message channel app.js (renderer process) ipc.send ('connect', url); main.js (browser

    process) ipc.on ('connect', function(event, url){}); 17
  6. browserWindow & webContents •  window.capturePage() •  webContents.printToPDF() •  webContents.enableDeviceEmulation() •

     webContents.sendInputEvent() •  webContents.executeJavaScript(code[, userGesture]) 20
  7. Pros •  Latest nodejs and Chrome integration •  Expose many

    browser features •  Actively Developing •  Update with Upstream Quickly •  Great Community Support 41
  8. Cons •  binary size is big⋯ •  limited native system

    features (still improving) •  lack some browser features (eg. workers) but you have nodejs & npm! 42