Standardize atom vs nw
This commit is contained in:
parent
874367e2c5
commit
1e5b7af490
1 changed files with 13 additions and 14 deletions
|
@ -1,18 +1,18 @@
|
||||||
# Technical differences to NW.js (formerly node-webkit)
|
# Technical Differences Between Electron and NW.js (formerly node-webkit)
|
||||||
|
|
||||||
__Note: Electron was previously named Atom Shell.__
|
__Note: Electron was previously named Atom Shell.__
|
||||||
|
|
||||||
Like NW.js, Electron provides a platform to write desktop applications
|
Like NW.js, Electron provides a platform to write desktop applications
|
||||||
with JavaScript and HTML and has Node integration to grant access to low level
|
with JavaScript and HTML and has Node integration to grant access to the low
|
||||||
system in web pages.
|
level system from web pages.
|
||||||
|
|
||||||
But there are also fundamental differences between the two projects that make
|
But there are also fundamental differences between the two projects that make
|
||||||
Electron a completely separate product from NW.js:
|
Electron a completely separate product from NW.js:
|
||||||
|
|
||||||
__1. Entry of application__
|
__1. Entry of Application__
|
||||||
|
|
||||||
In NW.js, the main entry of an application is a web page. You specify a
|
In NW.js the main entry point of an application is a web page. You specify a
|
||||||
main page in the `package.json` and it is opened in a browser window as
|
main page URL in the `package.json` and it is opened in a browser window as
|
||||||
the application's main window.
|
the application's main window.
|
||||||
|
|
||||||
In Electron, the entry point is a JavaScript script. Instead of
|
In Electron, the entry point is a JavaScript script. Instead of
|
||||||
|
@ -23,19 +23,18 @@ to decide when to quit the application.
|
||||||
Electron works more like the Node.js runtime. Electron's APIs are lower level
|
Electron works more like the Node.js runtime. Electron's APIs are lower level
|
||||||
so you can use it for browser testing in place of [PhantomJS](http://phantomjs.org/).
|
so you can use it for browser testing in place of [PhantomJS](http://phantomjs.org/).
|
||||||
|
|
||||||
__2. Build system__
|
__2. Build System__
|
||||||
|
|
||||||
In order to avoid the complexity of building the whole Chromium, Electron uses
|
In order to avoid the complexity of building all of Chromium, Electron uses [`libchromiumcontent`](https://github.com/brightray/libchromiumcontent) to access
|
||||||
[libchromiumcontent](https://github.com/brightray/libchromiumcontent) to access
|
Chromium's Content API. `libchromiumcontent` is a single shared library that
|
||||||
Chromium's Content API. libchromiumcontent is a single, shared library that
|
includes the Chromium Content module and all of its dependencies. Users don't
|
||||||
includes the Chromium Content module and all its dependencies. Users don't
|
|
||||||
need a powerful machine to build Electron.
|
need a powerful machine to build Electron.
|
||||||
|
|
||||||
__3. Node integration__
|
__3. Node Integration__
|
||||||
|
|
||||||
In NW.js, the Node integration in web pages requires patching Chromium to
|
In NW.js, the Node integration in web pages requires patching Chromium to
|
||||||
work, while in Electron we chose a different way to integrate libuv loop with
|
work, while in Electron we chose a different way to integrate the libuv loop
|
||||||
each platform's message loop to avoid hacking Chromium. See the
|
with each platform's message loop to avoid hacking Chromium. See the
|
||||||
[`node_bindings`](../../atom/common/) code for how that was done.
|
[`node_bindings`](../../atom/common/) code for how that was done.
|
||||||
|
|
||||||
__4. Multi-context__
|
__4. Multi-context__
|
||||||
|
|
Loading…
Reference in a new issue