资源名称:了不起的Node.js: 将Javascript进行到底
内容简介:
《了不起的Node.js:将Javascript进行到底》是一本经典的 Learning by Doing的书籍。它由 Node社区著名的 Socket.IO作者Guillermo Rauch,通过大量的实践案例撰写,并由 Node社区非常活跃的开发者 GoddyZhao翻译而成。《了不起的Node.js:将Javascript进行到底》内容主要由对五大部分的介绍组成: Node核心设计理念、 Node核心模块API、Web开发、数据库以及测试。从前到后、由表及里地对使用 Node进行Web开发的每一个环节都进行了深入的讲解,并且最大的特点就是通过大量的实际案例、代码展示来剖析技术点,讲解优秀实践。
资源目录:
PART Ⅰ 从安装与概念开始
CHAPTER 1 安装............................................... 3
在Windows下安装............................................... 3
在OS.X下安装. ................................................ 4
在Linux下安装................................................. 5
编译.............................................................5
确保安装成功. ...............................................5
Node.REPL................................................. 5
执行文件..........................................................6
NPM.................................................................6
安装模块...........................................................7
自定义模块........................................................8
安装二进制工具包. ..................................................9
浏览NPM仓库........................................................9
小结.................................................................10
CHAPTER2 Javascript概览.........................................11
介绍..........................................................11
Javascript基础.....................................................12
类型. .........................................................12
类型的困惑. ............................................... 12
函数. ..........................................................13
THIS、FUNCTION #CALL以及FUNCTION#APPLY.................... 14
函数的参数数量. ........................... 14
闭包. ........................................................14
类. ..............................................................15
继承. ..................................................... 16
TRY.{}.CATCH.{}...................................... 17
v8中的Javascript............................... 17
OBJECT#KEYS.......................................................18
ARRAY#ISARRAY................................................18
数组方法................................................. 18
字符串方法.. ....................................................19
JSON.............................................................19
FUNCTION#BIND.......................................................19
FUNCTION#NAME..............................................19
_PROTO_(继承). ............................................ 20
存取器....................................................... 20
小结..............................................................21
CHAPTER 3 阻塞与非阻塞IO................................. 23
能力越强,责任就越大.................................................23
阻塞. .............................................................25
单线程的世界. ............................................... 27
错误处理..................................................... 29
堆栈追踪................................................ 30
小结...............................................................32
CHAPTER 4 Node中的Javascript .....................................33
global对象.......................................................33
实用的全局对象. ................................................ 34
模块系统............................................................34
绝对和相对模块. ..................................................35
暴露API................................................................37
事件.........................................................38
buffer...............................................................40
小结...................................................................41
PART Ⅱ Node重要的API
CHAPTER 5 命令行工具(CLI)以及FS API:首个Node应用................... 45
需求................................................. 45
编写首个Node程序...................................... 46
创建模块.............................................. 46
同步还是异步. ............................ 47
理解什么是流(stream)................................... 49
输入和输出. ..........................................................50
重构. ........................................ 53
用fs进行文件操作. .............................. 55
对CLI一探究竟. .................................................56
argv.................................................... 57
工作目录...................................... 57
环境变量........................................... 58
退出. ............................................... 58
信号. ..........................................................58
ANSI转义码............................................ 59
对fs一探究竟. ................................................. 59
Stream.........................................................59
监视. .......................................... 60
小结...................................................... 61
CHAPTER 6 TCP ........................................... 63
TCP有哪些特性. .....................................................64
面向连接的通信和保证顺序的传递. ........................... 64
面向字节........................................ 65
可靠性............................................... 65
流控制......................................... 65
拥堵控制.............................................. 65
Telnet................................................................65
基于TCP的聊天程序............................................... 68
创建模块..................................... 68
理解NET.SERVER.API........................ 68
接收连接....................................... 70
data事件. ......................................................71
状态以及记录连接情况. ........................................ 73
圆满完成此程序. ............................................ 75
一个IRC客户端程序.......................................... 77
创建模块.............................................. 77
理解NET#STREAM.API.. .........................................78
实现部分IRC协议. ..................................................78
测试实际的IRC服务器. .................................. 78
小结.................................................................79
CHAPTER 7 HTTP ..................................................81
HTTP结构.........................................................81
头信息. ......................................................82
连接..............................................................87
一个简单的Web服务器..................................................88
创建模块....................................... 88
输出表单.................................................... 88
method和URL. ........................................... 90
数据. .............................................. 92
整合. ................................................ 94
让程序更健壮. ..................................... 95
一个Twitter.Web客户端......................................... 96
创建模块....................................... 96
发送一个简单的HTTP请求. ...................... 97
发送数据......................................... 98
获取推文................................................. 99
superagent来拯救..............................................102
使用up重启HTTP服务器..................................... 103
小结............................................. 104
PART Ⅲ Web开发
CHAPTER 8 Connect .............................. 107
使用HTTP构建一个简单的网站. ....................................... 108
通过Connect实现一个简单的网站...................................... 111
中间件. ................................................. 112
书写可重用的中间件. .........................114
static中间件. .............................................119
query中间件. .......................................120
logger中间件...................................................120
body.parser中间件. .................................122
cookie.........................................................125
会话(session). ......................................126
Redis.session..................................................131
methodOverride中间件. ...........................132
basicAuth中间件. ......................................132
小结..............................................................134
CHAPTER9 Express..................................................135
CHAPTER 10 WebSocket .................. 153
CHAPTER11 Socket.IO.............................................169
CHAPTER 12 MongoDB.......................193
CHAPTER13 MySQL...........................................217
CHAPTER 14 Redis......................................... 243
CHAPTER 15 代码共享 ................................. 263
CHAPTER 16 测试................................... 273
资源截图:
暂停服务!