Great Node.js: Taking JavaScript All the Way cover

Great Node.js: Taking JavaScript All the Way

Rating 3.6
Word count
436K words
Chapters
17
ISBN
9787121217692

Tags

Summary

Written by Guillermo Rauch, the creator of Socket.IO, this is an introductory and hands-on book on Node.js distinguished by its learning-by-doing approach. The book is divided into five main parts: Node's core design philosophy, the APIs of Node's core modules, web development, databases, and testing. It opens with installation on various platforms, the use of NPM, and JavaScript language features, then analyzes Node's underlying ideas such as blocking and non-blocking I/O, the event loop, the single-threaded model, and the module system; it goes on to explain the basics of network programming through examples including command-line tools and the fs file API, a TCP chat program and an IRC client, and an HTTP server and web client. The web development section introduces Connect middleware, the Express framework, HTML5 WebSocket, and Socket.IO in turn, linking the knowledge points through real-time application cases such as chat rooms and multi-user collaboration. The database section combines MongoDB (including Mongoose), MySQL (node-mysql and sequelize), and Redis to demonstrate data persistence and query modeling. The final chapter discusses sharing code between front end and back end and automated testing based on Mocha and expect.js. The book includes numerous full-color illustrations and runnable code examples, aiming to take readers from environment setup all the way to a complete working application.

Editor's review

很多 Node.js 入门书只讲 API,这本书的特色则在于“从原理到成品”的完整链条:前半部分讲清事件轮询、非阻塞 I/O 与模块系统,让读者明白 Node 为什么这样设计;后半部分则用聊天程序、Twitter 客户端、用户认证、社交图谱等真实项目,把 TCP/HTTP、WebSocket、Express、MongoDB、MySQL、Redis 一路串起来,最后落到代码共享与测试。作者是 Socket.IO 的创造者,对实时通信与高并发场景的一手经验,直接体现在案例设计中。全书采用全彩印刷,图表和代码排版清晰,292 页左右的篇幅厚而不冗,适合作为“第一本认真读完的 Node 书”。需要提醒的是,本书成书于 2014 年,示例基于当时的 Node 版本与回调式异步写法,如今阅读时应配合新版本文档,理解其思想而非照抄代码。

Who it's for

A good fit for

  • 有 JavaScript 基础、想转向服务端开发的前端工程师
  • 需要快速搭建实时通信或高并发 Web 服务的开发者
  • 计算机专业学生及技术培训班的 Node.js 课程读者
  • 希望理解异步 I/O、事件驱动架构原理的后端程序员

Not a good fit for

  • 完全零编程基础、尚未接触过 JavaScript 的初学者
  • 只想寻找最新版 Node.js 语法(如 async/await、ESM)教程的读者
  • 需要深入学习 V8 源码或底层内核机制的研究者

Reading tips

  1. 先通读第 1—4 章打牢事件轮询与模块系统的基础,再进入项目章节,避免只抄代码不懂原理。
  2. 每章示例务必在本机跑通,并按自己的需求做小幅改造,如把聊天室改成自己的业务场景。
  3. 数据库部分可按实际技术栈取舍,MongoDB、MySQL、Redis 三选一精读即可。
  4. 留意书中版本较旧,npm 包与 API 已有变化,遇到报错优先查阅官方最新文档。

About the publisher

Publishing House of Electronics Industry China · Founded in 1982

The Publishing House of Electronics Industry is a comprehensive publisher distinguished by its focus on electronic information and related fields. Judging from the more than 3,000 titles in its catalogue, its publishing covers programming and design, artificial intelligence, computer science, finance and economics, photography, and social sciences, attending both to cutting-edge technology and to general readers. Representative titles include Factor Investing: Methods and Practice, x86 Assembly Language: From Real Mode to Protected Mode, The RISC-V Reader, Artificial Intelligence: Speech Recognition, Understanding and Practice, Phased Array Radar Technology, Radar Target Characteristics, and 100 Go Mistakes and How to Avoid Them, most of which centre on technical methods and engineering practice. Its authors include Shi Chuan, Li Zhong, Wang Xiaobo, David Patterson, Andrew Waterman, and Yu Zihao, among others from China and abroad. Owing to limited public information, no further publishing features are elaborated here.

Contents

  1. Chapter 1 Installation
  2. Chapter 2 JavaScript Overview
  3. Chapter 3 Blocking and Non-Blocking IO
  4. Chapter 4 JavaScript in Node
  5. Chapter 5 Command-Line Tools (CLI) and the FS API: Your First Node Application
  6. Chapter 6 TCP
  7. Chapter 7 HTTP
  8. Chapter 8 Connect
  9. Chapter 9 Express
  10. Chapter 10 WebSocket
  11. Chapter 11 Socket.IO
  12. Chapter 12 MongoDB
  13. Chapter 13 MySQL
  14. Chapter 14 Redis
  15. Chapter 15 Code Sharing
  16. Chapter 16 Testing
  17. Index

FAQ

这本书适合零基础学 Node.js 吗?
不太适合完全零基础的读者。书中假定你已掌握 JavaScript 基本语法、作用域、闭包与原型等概念,第 2 章只是快速回顾。若连 JavaScript 都不熟,建议先补语言基础再读。
书中的代码还能直接运行吗?
成书于 2014 年,示例基于当时的 Node 版本与 npm 包版本,部分 API 和依赖已发生变化。核心思路仍然有效,但需要按当前官方文档调整写法与依赖版本。
这本书和《狼书:了不起的 Node.js》是同一本吗?
不是。本书作者为 Socket.IO 作者 Guillermo Rauch,赵静翻译,2014 年电子工业出版社出版(ISBN 9787121217692)。《狼书(卷1):了不起的 Node.js》是狼叔(i5ting)所著的另一本书。
全彩版和普通版有什么区别?
该书的电子工业出版社版本采用全彩印刷,包含彩色插图和代码高亮,页数在不同渠道标注为 292—304 页,ISBN 与内容主体一致,购买时以实际版次为准。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

Top rated in the same category