Merge pull request #1495 from bendrucker/grammar

Fix grammar in NW.js comparison
This commit is contained in:
Daniel Hengeveld 2015-04-27 13:30:26 -07:00
commit 5575d17d0e

View file

@ -3,7 +3,7 @@
__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 low level
system in web pages. system in 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
@ -11,39 +11,38 @@ 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 of an application is a web page. You specify a
main page in the `package.json` and it would be opened in a browser window as main page in the `package.json` and it is opened in a browser window as
the application's main window. the application's main window.
While in Electron, the entry point is a JavaScript script, instead of In Electron, the entry point is a JavaScript script. Instead of
providing a URL directly, you need to manually create a browser window and load providing a URL directly, you manually create a browser window and load
html file in it with corresponding API. You also need to listen to window events an HTML file using the API. You also need to listen to window events
to decide when to quit the application. to decide when to quit the application.
So Electron works more like the Node.js runtime, and APIs are more low level, Electron works more like the Node.js runtime. Electron's APIs are lower level
you can also use Electron for web testing purpose like so you can use it for browser testing in place of [PhantomJS](http://phantomjs.org/).
[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 the whole 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 its dependencies. So 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 to work, while in Electron we chose a different way to integrate libuv loop with
each platform's message loop to avoid hacking Chromium, see the 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__
If you are an experienced NW.js user, you should be familiar with the If you are an experienced NW.js user, you should be familiar with the
concept of Node context and web context, these concepts were invented because concept of Node context and web context. These concepts were invented because
of how the NW.js was implemented. of how NW.js was implemented.
By using the [multi-context](http://strongloop.com/strongblog/whats-new-node-js-v0-12-multiple-context-execution/) By using the [multi-context](http://strongloop.com/strongblog/whats-new-node-js-v0-12-multiple-context-execution/)
feature of Node, Electron doesn't introduce a new JavaScript context in web feature of Node, Electron doesn't introduce a new JavaScript context in web