Mastering Node.js

Mastering Node.js pdf epub mobi txt 电子书 下载 2025

出版者:Packt
作者:Sandro Pasquali
出品人:
页数:346
译者:
出版时间:2013-11
价格:£30.99
装帧:平装
isbn号码:9781782166320
丛书系列:
图书标签:
  • Node.js
  • 程序员秘籍
  • Node
  • js
  • JavaScript
  • 后端开发
  • 服务器端
  • Web开发
  • REST API
  • Express
  • MongoDB
  • 异步编程
  • 微服务
想要找书就要到 小美书屋
立刻按 ctrl+D收藏本页
你会得到大惊喜!!

具体描述

Node.js is a modern development stack focused on providing an easy way to build scalable network software. Backed by a growing number of large companies and a rapidly increasing developer base, Node is revolutionizing the way that software is being built today. Powered by Google’s V8 engine and built out of C++ modules, this is a JavaScript environment for the enterprise.

Mastering Node.js will take the reader deep into this exciting development environment. Beginning with a comprehensive breakdown of its innovative non-blocking evented design, Node’s structure is explained in detail, laying out how its blazingly fast I/O performance simplifies the creation of fast servers, scalable architectures, and responsive web applications.

Mastering Node.js takes you through a concise yet thorough tour of Node's innovative evented non-blocking design, showing you how to build professional applications with the help of detailed examples.

Learn how to integrate your applications with Facebook and Twitter, Amazon and Google, creating social apps and programs reaching thousands of collaborators on the cloud. See how the Express and Path frameworks make the creation of professional web applications painless. Set up one, two, or an entire server cluster with just a few lines of code, ready to scale as soon as you’re ready to launch. Move data seamlessly between databases and file systems, between clients, and across network protocols, using a beautifully designed, consistent, and predictable set of tools.

Mastering Node.js contains all of the examples and explanations you’ll need to build applications in a short amount of time and at a low cost, running on a scale and speed that would have been nearly impossible just a few years ago.

作者简介

Sandro Pasquali began writing games on a Commodore PET in grade school, and hasn't looked back. A polyglot programmer, who started with BASIC and assembly, his journey through C, Perl, and PHP led to JavaScript and the browser in 1995. He was immediately hooked on a vision of browsers as the software delivery mechanism of the future. By 1997 he had formed Simple.com, a technology company selling the world's first JavaScript-based application development framework, patenting several technologies and techniques that have proven prescient. Node represents for him only the natural next step in an inevitable march towards the day when all software implementations, and software users, are joined within a collaborative information network. He has led the design of enterprise-grade applications for some of the largest companies in the world, including Nintendo, Major League Baseball, Bang and Olufsen, LimeWire, and others. He has displayed interactive media exhibits during the Venice Biennial, won design awards, built knowledge management tools for research institutes and schools, and has started and run several startups. Always seeking new ways to blend design excellence and technical innovation, he has made significant contributions across all levels of software architecture, from data management and storage tools to innovative user interfaces and frameworks. He now works to mentor a new generation of developers also bitten by the collaborative software bug, especially the rabid ones.

目录信息

Preface
Chapter 1: Understanding the Node Environment
Chapter 2: Understanding Asynchronous Event-Driven Programming
Chapter 3: Streaming Data Across Nodes and Clients
Chapter 4: Using Node to Access the Filesystem
Chapter 5: Managing Many Simultaneous Client Connections
Chapter 6: Creating Real-time Applications
Chapter 7: Utilizing Multiple Processes
Chapter 8: Scaling Your Application
Chapter 9: Testing Your Application
Appendix A: Organizing Your Work
Appendix B: Introducing the Path Framework
Appendix C: Creating Your Own C++ Add-ons
Index
Preface
Up
Chapter 1: Understanding the Node Environment
Extending JavaScript
Events
Modularity
The Network
V8
Memory and other limits
Harmony
The process object
The Read-Eval-Print Loop and executing a Node program
Summary
Up
Chapter 2: Understanding Asynchronous Event-Driven Programming
Broadcasting events
Collaboration
Queueing
Listening for events
Signals
Forks
File events
Deferred execution
process.nextTick
Timers
setTimeout
setInterval
unref and ref
Understanding the event loop
Four sources of truth
Callbacks and errors
Conventions
Know your errors
Building pyramids
Considerations
Listening for file changes
Summary
Up
Chapter 3: Streaming Data Across Nodes and Clients
Exploring streams
Implementing readable streams
Pushing and pulling
Writable streams
Duplex streams
Transforming streams
Using PassThrough streams
Creating an HTTP server
Making HTTP requests
Proxying and tunneling
HTTPS, TLS(SSL), and securing your server
Creating a self-signed certificate for development
Installing a real SSL certificate
The request object
The URL module
The Querystring module
Working with headers
Using cookies
Understanding content types
Handling favicon requests
Handling POST data
Creating and streaming images with Node
Creating, caching, and sending a PNG representation
Summary
Up
Chapter 4: Using Node to Access the Filesystem
Directories, and iterating over files and folders
Types of files
File paths
File attributes
Opening and closing files
fs.open(path, flags, [mode], callback)
fs.close(fd, callback)
File operations
fs.rename(oldName, newName, callback)
fs.truncate(path, len, callback)
fs.ftruncate(fd, len, callback)
fs.chown(path, uid, gid, callback)
fs.fchown(fd, uid, gid, callback)
fs.lchown(path, uid, gid, callback)
fs.chmod(path, mode, callback)
fs.fchmod(fd, mode, callback)
fs.lchmod(path, mode, callback)
fs.link(srcPath, dstPath, callback)
fs.symlink(srcPath, dstPath, [type], callback)
fs.readlink(path, callback)
fs.realpath(path, [cache], callback)
fs.unlink(path, callback)
fs.rmdir(path, callback)
fs.mkdir(path, [mode], callback)
fs.exists(path, callback)
fs.fsync(fd, callback)
Synchronicity
Moving through directories
Reading from a file
Reading byte by byte
fs.read(fd, buffer, offset, length, position, callback)
Fetching an entire file at once
fs.readFile(path, [options], callback)
Creating a readable stream
fs.createReadStream(path, [options])
Reading a file line by line
The Readline module
Writing to a file
Writing byte by byte
fs.write(fd, buffer, offset, length, position, callback)
Writing large chunks of data
fs.writeFile(path, data, [options], callback)
fs.appendFile(path, data, [options], callback)
Creating a writable stream
fs.createWriteStream(path, [options])
Caveats
Serving static files
Redirecting requests
Location
Implementing resource caching
Handling file uploads
Putting it all together
Summary
Up
Chapter 5: Managing Many Simultaneous Client Connections
Understanding concurrency
Concurrency is not parallelism
Routing requests
Understanding routes
Using Express to route requests
Using Redis for tracking client state
Storing user data
Handling sessions
Cookies and client state
A simple poll
Centralizing states
Authenticating connections
Basic authentication
Handshaking
Summary
Further reading
Up
Chapter 6: Creating Real-time Applications
Introducing AJAX
Responding to calls
Creating a stock ticker
Bidirectional communication with Socket.IO
Using the WebSocket API
Socket.IO
Drawing collaboratively
Listening for Server Sent Events
Using the EventSource API
The EventSource stream protocol
Asking questions and getting answers
Building a collaborative document editing application
Summary
Up
Chapter 7: Utilizing Multiple Processes
Node's single-threaded model
The benefits of single-threaded programming
Multithreading is already native and transparent
Creating child processes
Spawning processes
Forking processes
Buffering process output
Communicating with your child
Sending messages to children
Parsing a file using multiple processes
Using the cluster module
Cluster events
Worker object properties
Worker events
Real-time activity updates of multiple worker results
Summary
Up
Chapter 8: Scaling Your Application
When to scale?
Network latency
Hot CPUs
Socket usage
Many file descriptors
Data creep
Tools for monitoring servers
Running multiple Node servers
Forward and reverse proxies
Nginx as a proxy
Using HTTP Proxy
Message queues – RabbitMQ
Types of exchanges
Using Node's UDP module
UDP multicasting with Node
Using Amazon Web Services in your application
Authenticating
Errors
Using S3 to store files
Working with buckets
Working with objects
Using AWS with a Node server
Getting and setting data with DynamoDB
Searching the database
Sending mail via SES
Authenticating with Facebook Connect
Summary
Up
Chapter 9: Testing Your Application
Why testing is important
Unit tests
Functional tests
Integration tests
Native Node testing and debugging tools
Writing to the console
Formatting console output
The Node debugger
The assert module
Sandboxing
Distinguishing between local scope and execution context
Using compiled contexts
Errors and exceptions
The domain module
Headless website testing with ZombieJS and Mocha
Mocha
Headless web testing
Using Grunt, Mocha, and PhantomJS to test and deploy projects
Working with Grunt
Summary
Up
Appendix A: Organizing Your Work
Loading and using modules
Understanding the module object
Resolving module paths
Using npm
Initializing a package file
Using scripts
Declaring dependencies
Publishing packages
Globally installing packages and binaries
Sharing repositories
Up
Appendix B: Introducing the Path Framework
Managing state
Bridging the client/server divide
Sending and receiving
Achieving a modular architecture
Up
Appendix C: Creating Your Own C++ Add-ons
Hello World
Creating a calculator
Implementing callbacks
Closing thoughts
Links and resources
Up
Index
· · · · · · (收起)

读后感

评分

评分

评分

评分

评分

用户评价

评分

评分

评分

评分

评分

本站所有内容均为互联网搜索引擎提供的公开搜索信息,本站不存储任何数据与内容,任何内容与数据均与本站无关,如有需要请联系相关搜索引擎包括但不限于百度google,bing,sogou

© 2025 book.quotespace.org All Rights Reserved. 小美书屋 版权所有