nwjs / nw.js

Call all Node.js modules directly from DOM/WebWorker and enable a new way of writing applications with all Web technologies.
https://nwjs.io
MIT License
40.31k stars 3.88k forks source link

Proposal: Decouple nodejs and offer Chromium Window Management via NodeJS #7762

Open frank-dspeed opened 3 years ago

frank-dspeed commented 3 years ago

Context

I am at present creating a overview of the existing WebTech Stack to create apps

The Question without the Why

can we get this repo into a state where we can in plain nodejs

import nw from 'nwjs'
nw.createWindow()

and do not get the nodejs.so dependency?

If yes!

i could use NWJS then for my open-pwa project as replacement for Chromium and create app windows with it.

The Why! I spotted the following

The best pattern to create web apps with Real Web Compat is to use a ipcChannel like electron does we pass the messages for and back between nodejs and the Chrome Process to Enable Security and context isolation as also allow to use multiple workers and cpu cores.

The Missing part is a Chrome version that allows to manipulate the App Window and that is where NWJS shines. The Only other Alternativ with a Compared Future Set of Window Manipulation Code for Chrome is the CEF Project Chrome Embedded Framework which is most easy useable with Java and the SWT Widget Kit via a Project Called JCEF used by Spotify to create Cross Platform apps

I my self work on a project called "open-pwa" it solves a lot of Issues around the App Development Process for cross Platform Desktop apps.

NACL and PEPPER as Also all other related Apis already got deprecated in favor of Nativ Host Messaging and that is exactly what i plan to use to get the System Wide Installed NodeJS version working with NWJS

Issues that would not exist.

hthetiot commented 3 years ago

Related https://github.com/open-pwa/open-pwa