Electron vs NW.js

Nicola Zambello

Nicola Zambello

Frontend developer @ RedTurtle

Studente @ UniFe

@nicolazambello

nzambello

nzambello @ italiajs.slack.com

Web app e desktop app

Electron vs nwjs

Creare un'applicazione nativa su chromium da una web app

  • Cross-platform
  • Javascript-based
  • React (in questo caso)

Electron is an open source library developed by GitHub for building cross-platform desktop applications with HTML, CSS, and JavaScript. Electron accomplishes this by combining Chromium and Node.js into a single runtime.
 

https://electronjs.org/docs/tutorial/about

NW.js

NW.js is an app runtime based on Chromium and node.js. You can write native apps in HTML and JavaScript with NW.js. It also lets you call Node.js modules directly from the DOM and enables a new way of writing native applications with all Web technologies.

It was created in the Intel Open Source Technology Center.

http://docs.nwjs.io/en/latest/

Use case

Differenze tecniche

  • entry point dell'applicazione
  • integrazione con Node
  • build system
  • contesto

Differenze pratiche

  • documentazione
  • difficoltà d'ingresso
  • performance
  • caso d'uso

Starters

Usare uno starter oppure from scratch?

🤔

Talk is cheap. Show me the code

 

̶  Linus Torvalds

Problemi avuti

Per la mia esperienza:

Electron NW.js
Node context e startup Routes (location)
Build

Conclusioni

Grazie!

Demo presentate (switch branch)

https://github.com/nzambello/electron-vs-nwjs