转载自: https://github.com/atom/electron/blob/master/docs/development/atom-shell-vs-node-webkit.md
Technical Differences Between Electron and NW.js (formerly node-webkit)
Note: Electron was previously named Atom Shell.
Like NW.js, Electron provides a platform to write desktop applications with JavaScript and HTML and has Node integration to grant access to the low level system from web pages.
But there are also fundamental differences between the two projects that make Electron a completely separate product from NW.js:
1. Entry of Application
In NW.js the main entry point of an application is a web page. You specify a main page URL in the package.json
and it is opened in a browser window as the application's main window.
In Electron, the entry point is a JavaScript script. Instead of providing a URL directly, you manually create a browser window and load an HTML file using the API. You also need to listen to window events to decide when to quit the application.
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.
2. Build System
In order to avoid the complexity of building all of Chromium, Electron uses libchromiumcontent
to access Chromium's Content API. libchromiumcontent
is a single shared library that includes the Chromium Content module and all of its dependencies. Users don't need a powerful machine to build Electron.
3. Node Integration
In NW.js, the Node integration in web pages requires patching Chromium to work, while in Electron we chose a different way to integrate the libuv loop with each platform's message loop to avoid hacking Chromium. See the node_bindings
code for how that was done.
4. Multi-context
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 of how NW.js was implemented.
By using the multi-context feature of Node, Electron doesn't introduce a new JavaScript context in web pages.
相关推荐
Atom-atom-format-shell.zip,在atom文本编辑器中设置shell脚本格式原子格式外壳,atom是一个用web技术构建的开源文本编辑器。
为 Atom-Shell 安装和构建 npm-modules。 如果您正在处理 Atom-Shell 项目,则aspm被设计为npm的替代品。 警告:目前可能不可靠。 目录 动机 有几种方法可以为 atom-shell 构建模块,但没有一种方法非常适合我...
Node-Webkit 创造了 Node context 和 web context 的概念,而 atom-shell 没有引入新的 context,而是直接使用 Node 的 Multi-context 特性(这一特性是 Atom 开发者赞助 Node 添加的)。 作者 GitHub 最初...
gulp-build-atom-shell ====================== ** 由于错误,目前无法在 Windows 上下载版本。 ** 用于为 Fireball 项目构建 atom-shell 的 gulp 插件。 这不是适用于任何 atom-shell 应用程序的 npm 包。 它将...
Atom-atom-import-js.zip,用于importjs的atom插件importjs原子包,atom是一个用web技术构建的开源文本编辑器。
Yeoman npm install -g yo自耕农发电机要从 npm 安装 generator-atom-shell,请运行: npm install -g generator-atom-shell 最后,启动生成器: yo atom-shell应用程序此生成器的默认安装后挂钩是构建和启动 ...
以简单的方式从 GIT 构建带有品牌标识的 Atom-shell 启动器,包括图标和其他资源。 为什么? 在 Atom-shell ,提到完整的品牌重塑意味着从源代码编译 atom-shell。 有一个可以让我们自动处理这个。 但是,它不支持...
应用程序将在build/[platform]/atom-shell (在 OS X 上为build/darwin/atom-shell或在 Windows 上为build/win32/atom-shell )。 我从哪里获得我的 API 密钥? 要使用此应用程序,您需要提供您的 FastBill 用户名...
Atom-node-feedsub.zip,订阅rss/atom/json提要并通知新项。馈送子,atom是一个用web技术构建的开源文本编辑器。
从Git构建atom-shell,并重建本机模块。 这是grunt-download-atom-shell的主要替代品,因为您可以在Atom构建过程中的同一时间用此软件包替换对它的使用。 为什么我还要这样做? 这样做的主要原因是由于在Windows上...
#hello-atom-shell atom-shell hello-app 应用程序到 Clojurescript 的端口。 hello-app 可以在 atom-shell 快速入门页面看到:
Atom-Atom-File-Icons.zip,A collection of custom Atom file-type iconsatom的自定义文件类型图标的集合,atom是一个用web技术构建的开源文本编辑器。
Atom-atom-npm-outdated.zip,Module Atom to keep your package.json up-to-date.Atom NPM过时,atom是一个用web技术构建的开源文本编辑器。
测试忽略证书错误atom-shell --ignore-certificate-errors 开关的独立测试克隆,然后像这样安装和运行 npm installgulp webservers # in one terminalgulp tests # in a second terminal您需要在路径中的某处使用...
Atom-atom-shortcuts.zip,Learn Atom's shortcuts (cheatsheet)Atom快捷方式包,atom是一个用web技术构建的开源文本编辑器。
npm install --save-dev gulp-download-atom-shell 用法 选项 version必需要下载的atom-shell版本。 outputDir必需将下载的原子外壳放在何处。 downloadDir查找和保存缓存的已下载原子外壳的位置。 symbols -下载...
Atom-atom-markdown-toc-auto.zip,保存时自动插入和更新目录自动降价,atom是一个用web技术构建的开源文本编辑器。
Atom-atom-languageclient.zip,Language Server Protocol support for Atom (the basis of Atom-IDE)Atom语言服务器协议客户端,atom是一个用web技术构建的开源文本编辑器。
Atom-atom-dark-fusion-syntax.zip,平面和色彩平衡的深色主题,最大限度地提高可读性暗融合语法,atom是一个用web技术构建的开源文本编辑器。
Atom-atom-symbols-view-plus.zip,An alternative to atom/symbols-view符号视图增强包,atom是一个用web技术构建的开源文本编辑器。