koush / electron-chrome

Other
969 stars 55 forks source link

NWJS instead of Electron #1

Closed tocttou closed 8 years ago

tocttou commented 8 years ago

NW.js already supports chrome APIs. Electron has already said that they won't support Chrome APIs. Would it not be better to use NW.js instead of using Electron and writing polyfills? Looks like NW.js is the most accurate environment that chrome apps can have outside of chrome.

koush commented 8 years ago

Yep, I'm aware. Nwjs may have been a better choice. Here's what sold Electron for me:

Electron has some big names behind it: Slack, Github, Microsoft (VSCode), Atom. Look at the issue trackers on both projects. Electron seemed to have more developers actively helping out and managing bugs. And I know a couple folks that are intimately familiar with the project, that I can chat up if I need help.

At the end of the day, I'll be sitting on someone's off brand implementation of the Chrome API. Whether it is my own, or nwjs. In the case of nwjs, if I find a bug in the chrome.* stack, it would likely require an entire rebuild and release of nwjs. Building the chrome.* pieces I need allows me to decouple it from the Electron platform. The current setup of this project lets me download and update the chrome runtime independent of electron. And update the chrome app, independent of the other two. Both directly from the Chrome store.

andrewjaykeller commented 8 years ago

In your readme you said you wrapped the sockets module and implemented something custom for sockets? Is that effort open sourced? I need to have a chrome extension interact with an electron app and pass messages back and forth, the only way i can seem to figure that out is through UDP or TCP. Any advice? I'm really open to any means for communication.

koush commented 8 years ago

i'd start up a local http server in electron and have the chrome extension talk to it.

The sockets stuff I wrote is closed source, it's not particularly useful to anyone but me, it's just a wrapper I use to abstract chrome.sockets and node sockets.

andrewjaykeller commented 8 years ago

I for sure can start the local server in electron, already have that all done and written. What are you doing in the chrome extension to bind to a UDP port? and send over UDP when needed?

Many thanks for any and all advice given.

Everything I seem to find in their documentation is about sockets in chrome apps.

koush commented 8 years ago

i don't use udp. it exists though. https://developer.chrome.com/apps/sockets_udp