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

Browser Invasion: Desktop Apps and the Web

Browser Invasion: Desktop Apps and the Web

The web’s biggest strength is that it’s universal: build a web site, and anyone with a browser and connection can access it. Desktop apps, however, have long been off-limits to web developers…but times change. Today, more and more apps are built with web technologies, and the benefits are many. In this session, you’ll learn how to use the tools and languages you already know to build rich, fully-featured desktop apps, and conquer a new galaxy of apps!

timgthomas

May 10, 2018
Tweet

More Decks by timgthomas

Other Decks in Programming

Transcript

  1. !

  2. // Main const { ipcMain } = require(‘electron’); ipcMain.on(‘ember-request’, evt

    => { evt.sender.send(‘electron-reply’, ‘yay!’); });
  3. // “Browser” const { ipcRenderer } = require(‘electron’); ipcRenderer.on(‘electron-reply’, reply

    => { console.log(‘reply received!’, reply); }); ipcRenderer.send(‘ember-request’)
  4. const { readdir } = require(‘fs’); ipcMain.on(‘get-files’, evt => {

    readdir(‘/foo’, (err, files) => { evt.sender.send(‘files’, files); }); });
  5. const { Menu } = require(‘electron’); const applicationMenu = Menu.buildFromTemplate([

    { label: ‘Edit’, submenu: [ /* ... */ ], } ]); Menu.setApplicationMenu(applicationMenu);
  6. module.exports = { make_targets: { darwin: [ ‘zip’, ], linux:

    [ ‘deb’, ], }, electronPackagerConfig: { appCopyright: ‘Copyright © 2018’, name: ‘<%= productName %>’, icon: ‘ember-electron/resources/icon.icns’ }, };
  7. module.exports = { make_targets: { darwin: [ ‘zip’, ], linux:

    [ ‘deb’, ], }, electronPackagerConfig: { appCopyright: ‘Copyright © 2018’, name: ‘<%= productName %>’, icon: ‘ember-electron/resources/icon.icns’ }, };
  8. module.exports = { make_targets: { darwin: [ ‘zip’, ], linux:

    [ ‘deb’, ], }, electronPackagerConfig: { appCopyright: ‘Copyright © 2018’, name: ‘<%= productName %>’, icon: ‘ember-electron/resources/icon.icns’ }, };
  9. // ✓ Runs on macOS or Windows____ // ✓ Public

    GitHub repo__________ // ✓ Uses GitHub releases________ // ✓ Has code-signed builds______ require(‘update-electron-app')();