 廖雪峰JavaScript教程扩展 8 underscore 8.1 Collections 8.2 Arrays 8.3 Functions 8.4 Objects 8.5 Chaining 9 Node.js 9.1 安装Node.js和npm 9.2 第一个Node程序 9.3 模块 9.4 基本模块 9.4.1 fs 9.4.2 stream 9.4.3 http 9.4.4 buffer 9 一阵子,不过随着移动应用的兴起,没有人用Flash开发手机 App,所以它目前已经边缘化了。相反,随着HTML5在PC和移动端越来越流行,JavaScript变得更加 重要了。并且,新兴的Node.js把JavaScript引入到了服务器端,JavaScript已经变成了全能型选 手。 JavaScript一度被认为是一种玩具编程语言,它有很多缺陷,所以不被大多数后端开发人员所重视。 很 /56.html Chaining 小结 8.5 Chaining - 225 - 本文档使用 书栈(BookStack.CN) 构建 9 Node.js 从本章开始,我们就正式开启JavaScript的后端开发之旅。 Node.js是目前非常火热的技术,但是它的诞生经历却很奇特。 众所周知,在Netscape设计出JavaScript后的短短几个月,JavaScript事实上已经是前端开发的0 码力 | 264 页 | 2.81 MB | 10 月前3 廖雪峰JavaScript教程扩展 8 underscore 8.1 Collections 8.2 Arrays 8.3 Functions 8.4 Objects 8.5 Chaining 9 Node.js 9.1 安装Node.js和npm 9.2 第一个Node程序 9.3 模块 9.4 基本模块 9.4.1 fs 9.4.2 stream 9.4.3 http 9.4.4 buffer 9 一阵子,不过随着移动应用的兴起,没有人用Flash开发手机 App,所以它目前已经边缘化了。相反,随着HTML5在PC和移动端越来越流行,JavaScript变得更加 重要了。并且,新兴的Node.js把JavaScript引入到了服务器端,JavaScript已经变成了全能型选 手。 JavaScript一度被认为是一种玩具编程语言,它有很多缺陷,所以不被大多数后端开发人员所重视。 很 /56.html Chaining 小结 8.5 Chaining - 225 - 本文档使用 书栈(BookStack.CN) 构建 9 Node.js 从本章开始,我们就正式开启JavaScript的后端开发之旅。 Node.js是目前非常火热的技术,但是它的诞生经历却很奇特。 众所周知,在Netscape设计出JavaScript后的短短几个月,JavaScript事实上已经是前端开发的0 码力 | 264 页 | 2.81 MB | 10 月前3
 前端开发者指南(2017)学习前端应用架构 学习数据(例如,JSON)API 的设计 学习 React & Redux 学习渐进式 Web 应用 学习设计 JS API 学习web开发工具 学习命令行的使用 学习 Node.js 学习 JS 模块系统 学习模块加载和打包工具 学习包管理工具 学习版本控制 学习构建及任务自动化技术 学习网站性能优化 学习测试 学习无头浏览器 学习离线开发 学习网络/浏览器/应用的安全 学习前端应用架构 学习数据(例如,JSON)API 的设计 学习 React & Redux 学习渐进式 Web 应用 学习设计 JS API 学习web开发工具 学习命令行的使用 学习 Node.js 学习 JS 模块系统 学习模块加载和打包工具 学习包管理工具 Introduction 8 学习版本控制 学习构建及任务自动化技术 学习网站性能优化 学习测试 学习无头浏览器 和浏览器技能。 除了 HTML、CSS、DOM、JavaScript、HTTP/URL以及浏览器开发的专业知识,一个前端开 发者还需要掌握以下一项或多项技能: 内容管理系统(亦称 CMS) Node.js 跨浏览器测试 跨平台测试 单元测试 跨设备测试 Accessibility / WAI-ARIA 搜索引擎优化(亦称 SEO) 交互或用户界面设计 用户体验 适用性 电子商务系统0 码力 | 164 页 | 6.43 MB | 1 年前3 前端开发者指南(2017)学习前端应用架构 学习数据(例如,JSON)API 的设计 学习 React & Redux 学习渐进式 Web 应用 学习设计 JS API 学习web开发工具 学习命令行的使用 学习 Node.js 学习 JS 模块系统 学习模块加载和打包工具 学习包管理工具 学习版本控制 学习构建及任务自动化技术 学习网站性能优化 学习测试 学习无头浏览器 学习离线开发 学习网络/浏览器/应用的安全 学习前端应用架构 学习数据(例如,JSON)API 的设计 学习 React & Redux 学习渐进式 Web 应用 学习设计 JS API 学习web开发工具 学习命令行的使用 学习 Node.js 学习 JS 模块系统 学习模块加载和打包工具 学习包管理工具 Introduction 8 学习版本控制 学习构建及任务自动化技术 学习网站性能优化 学习测试 学习无头浏览器 和浏览器技能。 除了 HTML、CSS、DOM、JavaScript、HTTP/URL以及浏览器开发的专业知识,一个前端开 发者还需要掌握以下一项或多项技能: 内容管理系统(亦称 CMS) Node.js 跨浏览器测试 跨平台测试 单元测试 跨设备测试 Accessibility / WAI-ARIA 搜索引擎优化(亦称 SEO) 交互或用户界面设计 用户体验 适用性 电子商务系统0 码力 | 164 页 | 6.43 MB | 1 年前3
 JavaScript Promise迷你书(中文版)如果你读过上面的其中一本的话,就应该非常容易理解本书的内容了。 另外如果你有使用JavaScript编写Web应用程序的经验,或者使用Node.js编写过命令 行、服务器端程序的话,那么你可能会对本文中的一些内容感到非常熟悉。 本书的一本分章节将会以Node.js环境为背景进行说明,如果你有Node.js基础的话,那 么一定会非常容易理解这部分内容了。 格式约定 本书为了节约篇幅,用了下面一些格式上的约定。 • html JavaScript Promise 迷你书(中文版) 6 // 取得成功时的处理 }); ---- <1> 传给回调函数的参数为(error对象, 执行结果)组合 Node.js等则规定在JavaScript的回调函数的第一个参数为 Error 对象,这也是它的一个 惯例。 像上面这样基于回调函数的异步处理如果统一参数使用规则的话,写法也会很明了。 但是,这也仅是编 responseText) 在response的内容中加入了参数。 resolve方法的参数并没有特 别的规则,基本上把要传给回调函数参数放进去就可以了。 ( then 方法可以接收到这 个参数值) 熟悉Node.js的人,经常会在写回调函数时将 callback(error, response) 的第一个参数 设为error对象,而在Promise中resolve/reject则担当了这个职责(处理正常和异常的情0 码力 | 112 页 | 1010.02 KB | 1 年前3 JavaScript Promise迷你书(中文版)如果你读过上面的其中一本的话,就应该非常容易理解本书的内容了。 另外如果你有使用JavaScript编写Web应用程序的经验,或者使用Node.js编写过命令 行、服务器端程序的话,那么你可能会对本文中的一些内容感到非常熟悉。 本书的一本分章节将会以Node.js环境为背景进行说明,如果你有Node.js基础的话,那 么一定会非常容易理解这部分内容了。 格式约定 本书为了节约篇幅,用了下面一些格式上的约定。 • html JavaScript Promise 迷你书(中文版) 6 // 取得成功时的处理 }); ---- <1> 传给回调函数的参数为(error对象, 执行结果)组合 Node.js等则规定在JavaScript的回调函数的第一个参数为 Error 对象,这也是它的一个 惯例。 像上面这样基于回调函数的异步处理如果统一参数使用规则的话,写法也会很明了。 但是,这也仅是编 responseText) 在response的内容中加入了参数。 resolve方法的参数并没有特 别的规则,基本上把要传给回调函数参数放进去就可以了。 ( then 方法可以接收到这 个参数值) 熟悉Node.js的人,经常会在写回调函数时将 callback(error, response) 的第一个参数 设为error对象,而在Promise中resolve/reject则担当了这个职责(处理正常和异常的情0 码力 | 112 页 | 1010.02 KB | 1 年前3
 JavaScript Promiseの本 v2Primer #jsprimer10 または、JavaScriptでウェブアプリケーションを書いた経験やNode.js でコマンドラインア プリやサーバサイドを書いたことがあれば、 どこかで見たことがある内容が出てくるかもし れません。 一部セクションではNode.js環境での話となるため、Node.jsについて軽くでも知っておくと より理解がしやすいと思います。 表記法 この書籍では短縮するために幾つかの表記を用いています。 (error) { // 取得失敗時の処理 throw error; } // 取得成功の処理 }); コールバック関数の引数には(エラーオブジェクト, 結果)が入る Node.js等JavaScriptでのコールバック関数の第一引数には Error オブジェクトを渡す というルールを用いるケースがあります。 このようにコールバックでの非同期処理もルールが統一されていた場合、コールバック関 resolveの 引数に入れる値には特に決まりはありませんが、コールバックと同様に次の処理へ渡したい 値を入れるといいでしょう。 (この値は then メソッドで受け取ることができます) Node.jsをやっている人は、コールバックを書く時に callback(error, response) と第 一引数にエラーオブジェクトを 入れることがよくあると思いますが、Promiseでは役割が r0 码力 | 137 页 | 1.17 MB | 1 年前3 JavaScript Promiseの本 v2Primer #jsprimer10 または、JavaScriptでウェブアプリケーションを書いた経験やNode.js でコマンドラインア プリやサーバサイドを書いたことがあれば、 どこかで見たことがある内容が出てくるかもし れません。 一部セクションではNode.js環境での話となるため、Node.jsについて軽くでも知っておくと より理解がしやすいと思います。 表記法 この書籍では短縮するために幾つかの表記を用いています。 (error) { // 取得失敗時の処理 throw error; } // 取得成功の処理 }); コールバック関数の引数には(エラーオブジェクト, 結果)が入る Node.js等JavaScriptでのコールバック関数の第一引数には Error オブジェクトを渡す というルールを用いるケースがあります。 このようにコールバックでの非同期処理もルールが統一されていた場合、コールバック関 resolveの 引数に入れる値には特に決まりはありませんが、コールバックと同様に次の処理へ渡したい 値を入れるといいでしょう。 (この値は then メソッドで受け取ることができます) Node.jsをやっている人は、コールバックを書く時に callback(error, response) と第 一引数にエラーオブジェクトを 入れることがよくあると思いますが、Promiseでは役割が r0 码力 | 137 页 | 1.17 MB | 1 年前3
 JavaScript Promiseの本 v1だと思います。 または、JavaScriptでウェブアプリケーションを書いたことがある、 Node.js でコマンドライ ンアプリやサーバサイドを書いたことがあれば、 どこかで書いたことがあるような内容が出 てくるかもしれません。 一部セクションではNode.js環境での話となるため、Node.jsについて軽くでも知っておくと より理解がしやすいと思います。 表記法 この書籍では短縮するために幾つかの表記を用いています。 if(error){// 取得失敗時の処理 throw error; } // 取得成功の処理 }); コールバック関数の引数には(エラーオブジェクト, 結果)が入る Node.js等JavaScriptでのコールバック関数の第一引数には Error オブジェクトを渡す というルールを用いるケースがあります。 このようにコールバックでの非同期処理もルールが統一されていた場合、コールバック関 resolveの 引数に入れる値には特に決まりはありませんが、コールバックと同様に次の処理へ渡したい 値を入れるといいでしょう。 (この値は then メソッドで受け取ることができます) Node.jsをやっている人は、コールバックを書く時に callback(error, response) と第 一引数にエラーオブジェクトを 入れることがよくあると思いますが、Promiseでは役割が r0 码力 | 115 页 | 1.06 MB | 1 年前3 JavaScript Promiseの本 v1だと思います。 または、JavaScriptでウェブアプリケーションを書いたことがある、 Node.js でコマンドライ ンアプリやサーバサイドを書いたことがあれば、 どこかで書いたことがあるような内容が出 てくるかもしれません。 一部セクションではNode.js環境での話となるため、Node.jsについて軽くでも知っておくと より理解がしやすいと思います。 表記法 この書籍では短縮するために幾つかの表記を用いています。 if(error){// 取得失敗時の処理 throw error; } // 取得成功の処理 }); コールバック関数の引数には(エラーオブジェクト, 結果)が入る Node.js等JavaScriptでのコールバック関数の第一引数には Error オブジェクトを渡す というルールを用いるケースがあります。 このようにコールバックでの非同期処理もルールが統一されていた場合、コールバック関 resolveの 引数に入れる値には特に決まりはありませんが、コールバックと同様に次の処理へ渡したい 値を入れるといいでしょう。 (この値は then メソッドで受け取ることができます) Node.jsをやっている人は、コールバックを書く時に callback(error, response) と第 一引数にエラーオブジェクトを 入れることがよくあると思いますが、Promiseでは役割が r0 码力 | 115 页 | 1.06 MB | 1 年前3
 Learning Socket.IObrowser, and a server-side library for node.js. Both components have a nearly identical API. Like node.js, it is event-driven. Socket.IO primarily uses the websocket protocol with polling as a fallback First, install socket.io module in node.js application. npm install socket.io --save Basic HTTP Setup The following example attaches socket.io to a plain node.js HTTP server listening on port 3000. world!" with socket messages. Install node modules npm install express npm install socket.io Node.js server const express = require('express'); const app = express(); const server = app.listen(30000 码力 | 15 页 | 870.16 KB | 1 年前3 Learning Socket.IObrowser, and a server-side library for node.js. Both components have a nearly identical API. Like node.js, it is event-driven. Socket.IO primarily uses the websocket protocol with polling as a fallback First, install socket.io module in node.js application. npm install socket.io --save Basic HTTP Setup The following example attaches socket.io to a plain node.js HTTP server listening on port 3000. world!" with socket messages. Install node modules npm install express npm install socket.io Node.js server const express = require('express'); const app = express(); const server = app.listen(30000 码力 | 15 页 | 870.16 KB | 1 年前3
 gevent-socketio Documentation
Release 0.3.1Python implementation of the protocol. The reference server implementation of Socket.IO runs on Node.js and was developed by LearnBoost. There are now server implementations in a variety of languages. events, callbacks. It adds security in a pythonic way with granular ACLs (which don’t exist in the Node.js version) at the method level. The project has several examples in the source code and in the documentation gevent-socketio Documentation, Release 0.3.1 12 Chapter 6. API docs CHAPTER 7 References LearnBoost’s node.js version is the reference implementation, you can find the server component at this address: https://github0 码力 | 23 页 | 117.07 KB | 1 年前3 gevent-socketio Documentation
Release 0.3.1Python implementation of the protocol. The reference server implementation of Socket.IO runs on Node.js and was developed by LearnBoost. There are now server implementations in a variety of languages. events, callbacks. It adds security in a pythonic way with granular ACLs (which don’t exist in the Node.js version) at the method level. The project has several examples in the source code and in the documentation gevent-socketio Documentation, Release 0.3.1 12 Chapter 6. API docs CHAPTER 7 References LearnBoost’s node.js version is the reference implementation, you can find the server component at this address: https://github0 码力 | 23 页 | 117.07 KB | 1 年前3
 gevent-socketio Documentation
Release 0.3.1Python implementation of the protocol. The reference server implementation of Socket.IO runs on Node.js and was developed by LearnBoost. There are now server implementations in a variety of languages. events, callbacks. It adds security in a pythonic way with granular ACLs (which don’t exist in the Node.js version) at the method level. The project has several examples in the source code and in the documentation transports. socketio.server Auto-generated indexes: Index Module Index References LearnBoost’s node.js version is the reference implementation, you can find the server component at this address: https://github0 码力 | 91 页 | 118.05 KB | 1 年前3 gevent-socketio Documentation
Release 0.3.1Python implementation of the protocol. The reference server implementation of Socket.IO runs on Node.js and was developed by LearnBoost. There are now server implementations in a variety of languages. events, callbacks. It adds security in a pythonic way with granular ACLs (which don’t exist in the Node.js version) at the method level. The project has several examples in the source code and in the documentation transports. socketio.server Auto-generated indexes: Index Module Index References LearnBoost’s node.js version is the reference implementation, you can find the server component at this address: https://github0 码力 | 91 页 | 118.05 KB | 1 年前3
 Web 开发技术-JavaScriptVCG JavaScript 2020/4/28 8 2. JavaScript 功能  其他功能,如  网络服务器(Node.js)  处理 Web 应用的 HTTP 请求  机器学习(TensorFlow.js)  在浏览器/Node.js 上开发、训练和部署 ML 模型  开发桌面应用(ELECTRON)  使用 JS/HTML/CSS 构建跨平台的桌面应用0 码力 | 21 页 | 1.02 MB | 1 年前3 Web 开发技术-JavaScriptVCG JavaScript 2020/4/28 8 2. JavaScript 功能  其他功能,如  网络服务器(Node.js)  处理 Web 应用的 HTTP 请求  机器学习(TensorFlow.js)  在浏览器/Node.js 上开发、训练和部署 ML 模型  开发桌面应用(ELECTRON)  使用 JS/HTML/CSS 构建跨平台的桌面应用0 码力 | 21 页 | 1.02 MB | 1 年前3
 The JavaScript Handbook
We mainly use JavaScript to create websites web applications server-side applications using Node.js but JavaScript is not limited to these things, and it can also be used to create mobile applications ecosystems of the world. JavaScript is now widely used also outside of the browser. The rise of Node.js in the last few years unlocked backend development, once the domain of Java, Ruby, Python, PHP0 码力 | 56 页 | 577.92 KB | 1 年前3 The JavaScript Handbook
We mainly use JavaScript to create websites web applications server-side applications using Node.js but JavaScript is not limited to these things, and it can also be used to create mobile applications ecosystems of the world. JavaScript is now widely used also outside of the browser. The rise of Node.js in the last few years unlocked backend development, once the domain of Java, Ruby, Python, PHP0 码力 | 56 页 | 577.92 KB | 1 年前3
共 21 条
- 1
- 2
- 3














