152 points · by hswolff · 11y ago · 81 comments
Node Webkit has a forked version of Chromium Source with modifications (removed the event handler and replace with NodeJS one and a bunch of others). Seen at https://github.com/nwjs/chromium.src
Electron uses the Content framework and has no modifications to Chromium. Directly calling the required parts from the source (example https://github.com/atom/electron/tree/master/chromium_src/ch...).
That is the major difference, in regards to architecture. Basically in Atom you need to create the Window, and in NodeWebkit you always have a Window and you need to do stuff to that Window.
The other ones include things like backers, NodeWebkit is backed mostly by Intel, as one of their developers is who is building it. Atom is backed by Github bunch of others.
https://github.com/atom/electron/blob/master/docs/developmen...
Slack, Mapbox and more.
As it is you still have to do a bunch of the packaging manually (or design your own shell script for it), and for whatever inane reason, `npm install electron-prebuilt` only downloads the binary for your current platform, so you can't even make a replicable build process by using it as a base and using scripts that copy the different binaries.
Atom is a completely separate project (started by Github, not Mozilla) to build a native text editor using web technologies. The text editor is a native application, but it exposes a Javascript API for plugins. After a while, Github realized that the infrastructure needed to make Atom work (e.g. installers, updates, notifications, etc.) could also be used by other projects, so that code was split off into "Atom Shell". It's this project that's getting renamed to "Electron".
It is the, well, shell of the Atom editor.
Sounds pretty straightforward to me. They created APIs for Node.js to allow people to make cross-platform applications, such as Atom (a text editor).
> It now includes automatic app updates, Windows installers, crash reporting, notifications, and other useful native app features
* automatic app updates : We have distribution repositories for this. * windows installers: Doesn't window have it's own like app store now (market something?) * notifications: which we already had on all major OSs for years.
- auto updates : primarily useful for commercial software that isn't "eligible" for, or chooses not to pay to use, commercial app stores. Or other apps that for whatever reason don't meet the criteria for public repositories and don't want the hassle (for the publisher or consumer) of using a private repo.
- Windows installers : same reasoning as above.
- Notifications : I believe its a standardised cross-platform api onto the existing system-specific notification apis, not a new notification system.
having it be that deeply associated with the other brand reduces the visibility of the project?
irony alert: Brendan Eich has said publicly that CoffeeScript was the impetus for several of the features that made it into ES-6, like fat arrows.
Without CoffeeScript, lots of people wouldn’t have known that they wanted some of the things that are in ES-6.
As it is, you don’t need CoffeeScript to develop for Atom. Which is part of the beauty of CoffeeScript. It’s interoperable with what you’re doing today.
irony alert: Brendan Eich has said publicly that CoffeeScript was the impetus for several of the features that made it into ES-6, like fat arrows.
ES6 is a real specification supported by JavaScript engines. As it is, you don’t need CoffeeScript to develop for Atom. Which is part of the beauty of CoffeeScript. It’s interoperable with what you’re doing today.
The core of the Open Source project is in CoffeeScript.Let's say the community had their way, and Atom was rewritten in JS well.
There's still a JS/V8/Chrome for a dependency. On an application where we're rendering huge walls of text - we forgo native redraw. Crucial to response time.
It's fun and time-saving for core developers to forgo the grueling work of portable, native, fast code.
But who pays the cost for the shortcuts?
...
> There's still a JS/V8/Chrome for a dependency. On an application where we're rendering huge walls of text - we forgo native redraw. Crucial to response time. > What makes Atom a viable choice when there already is free, open source, native, cross-platform editors with great plugin ecosystems?
I guess maybe CoffeeScript isn't what turned you away?
EDIT: here's a demo app with zero CoffeeScript: https://github.com/thom-nic/electron-demo
Ignore the haters, they will always exist. Just keep build great stuff.
Also, it's nice to work in a language that has the right features and not just all the features. I like CoffeeScript as much for what it doesn't have as for what it does have. I recently saw this piece of code:
new Array(26)
.map(function (item, index) {
return String.fromCharCode(65 + index);
})
as a "heads up" for map lovers. That's the kind of code that people write when they're tacking the latest new feature onto someplace that it doesn't belong. This code isn't just semantically wrong, it's stylistically wrong. Having a less schizophrenic language helps jr guys avoid code like the above. const caps = new Array(26).map((item, index) => String.fromCharCode(65 + index));
It's not wrong. Could maybe be better though. const caps = new Array(26).map((item, index) => String.fromCharCode(65 + index));
Shorter, easier to reason against. const caps = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');Someone will probably chime in here with a correction, but the point is this -- JS is NOT a friendly language to deal with.
[65..90].map (number) -> String.fromCharCode(number)
where you're operating on the elements of your array and you don't care about their index. Array.apply(null, Array(26)).map((_, index) => String.fromCharCode(65 + index))- https://discuss.atom.io/t/why-coffeescript/131
- https://meta.discourse.org/t/is-it-better-for-discourse-to-u...
More people are familiar with Notepad than vi. Does that make vi a bad choice?
That analogy doesn't work, because editors don't have network effects, whereas programming languages do.
Additionally it's also a bad name because it's impossible to google.
I forget which language it was, but someone interviewed the creator and he said if he had to do anything different he would not have named it something so hard to google.
Apple? C? when something gains critical mass it's really irrelevant anyway, since they become easy to google (atom shell is already a front page result for "electron").
or is the argument that they are bad names because they are not "relevant"? again.. Apple... C... if anything i'd say "electron" is super cliche and exactly the type of name i'd expect a library to have.
[1] http://en.wikipedia.org/wiki/Acorn_Computers
Very different to passwords, which should be computer-generated and computer-stored, you should never know your passwords.