Starting today with Big Bear {{BB}} Start translating node's series of foreign language books, bear is responsible for translating "node. js in Action" book, and I am temporarily responsible for translating this "hands-on node. js" (download), in order to facilitate understanding of the way not to use literal translation, If there is a wrong translation of the place also please enlighten me, I will be in time.
Introduction
At the 09 European jsconf Conference, a young programmer named Ryan Dahl introduced a project he was responsible for. The project combines the Google V8 JavaScript engine and the event loop mechanism to create a server-side platform using JS. The project is not the same as other server-side JS platforms: All I/O primitives are event-driven and there are no other shortcuts. By dint of the powerful and simple JS, originally based on asynchronous read-write application tasks, from the complexity to become simple and good implementation.
Dahl's speech ended with applause, and his projects have been developed in an unprecedented fashion and are widely adopted.
The project is named node. js and is often referred to as "node" by programmers. Node provides a pure event-driven, non-blocking architecture to create highly concurrent programs that allow you to easily construct fast and scalable network services.
introductionat the European jsconf, a young programmer by the name of Ryan Dahl, I Ntroduced a projecthe had been working on. This project is a platform that combined Google's V8 JavaScript engineand an event loop to create a server-side platform Programmable in JavaScript. The project took adifferent direction from other server-side JavaScript platforms:all I/O primitives were Event-driven,an D there was no-around it. Leveraging the power and simplicity of JavaScript, it turned thedifficult task of writing asynchronous applications into a n Easy one. Since receiving a standingovation at the end of its talk, Dahl ' s project had been met with unprecedented growth, popularit Yand adoption. The project was named node. js, now known to developers simply as ' Node '. Node provides purelyevented, non-blocking infrastructure for building highly concurrent software. Node allows to easily construct fast and scalable network services.
Original
Why is node so suddenly and exponentially popular?
Service-side JS has already appeared for a long while, what makes Node platform so compelling?
Looking at the previous implementation of the service-side JS , more focused on the place to deal with other platforms (such as Ruby, PERL, Python) commonly used methods to move to JS, and JS itself bushel. Node skips this processing and says--"Let's use programming modules on the web that can drive events successfully to easily create scalable services and make this way irreplaceable, Omnipotent ".
It can be said that JS itself has made a great contribution to node's success, but this does not explain why other server-side projects before node are not popular. Although JS does have universality, Ryan dah points out that unlike other server-side attempts to JS, unifying the client and server language is not the primary goal of node.
In my opinion, node success has three main factors:
1. Node is simple-using event-driven I/O programming is the best I/O programming method, which is easier to understand and more successful than the implementation of other existing platforms.
2. Node is very concise-it doesn't try to solve all the problems, but relies on a clearly defined functional API to provide the foundation and support for dealing with Internet protocols.
3.Node does not compromise-it does not try to be compatible with previous software and allows people to revisit and nod their positioning.
Why the sudden, exponential popularity? Server-side JavaScript have been around for some time, what makes this platform so appealing? In previous server-side JavaScript implementations, JavaScript is the raison d ' etre, and Theapproach focussed on Translat ing common practices from and platforms like Ruby, PERL Andpython, into JavaScript. Node took a leap from this and said: "Let's use the successful event-drivenprogramming model of the web and use it for make An easy to build scalable servers. And let ' smake it the-only-people can do anything on this platform. It can be argued this JavaScript itself contributed to much of Node's success, but that would notexplain what other the SER Ver-side projects proceeding Node has not yet come close in popularity. The ubiquity of JavaScript surely have played a role, but, as Ryan Dahl points off, unlike other Serversidejavascript Attem PTS, unifying the client and server into a common language is not the primarygoal for node.in my perspective tHere is three factors contributing to Node ' s success:1. Node is Easy-node makes Event-driven I/O programming, the best-to-do I/O programming,much easier to understand and a Chieve than in any other existing platform.2. Node is Lean-node does not a try to solve all problems. It lays the foundation and supportsthe basic Internet protocols using clean, functional apis.3. Node does not compromise-node does not try-to is compatible with pre-existing software,it takes a fresh look at Y believe is the right direction.
Original
This book covers the content
We'll analyze why node doesn't go the way, and why you should use node, and how to use node. We'll start with an overview and then quickly move on to the modular code. In the end you will learn to create and test your own node module, server / client applications, and enjoy node 's convenience and various API.
What does the book cover? We'll analyze what makes Node a different proposal to other server-side solutions, why youshould use it, and how to get Started. We'll start with a overview but quickly dive into Somecode module-by-module. By the end of this book you should is able to build and test your Ownnode modules, service Producers/consumers and feel co Mfortable using Node ' s conventions andapi.
Original
The contents of this book are not covered
This book is not intended to cover all of the node APIs, but we'll cover the most common parts of the applications that the authors think are needed.
This book will not involve any node framework. node is a great tool for creating frameworks, There are also useful frameworks, such as cluster-managed, cross-process communication, web framework, network traffic Integration tool, game engine, and so on. But before you start contacting the framework, you should familiarize yourself with the
What does the book is not cover? This book does not attempt to cover the complete Node API. Instead, we'll cover what's the authorthinks is required to build most applications he would build on Node.this book does Not cover any Node frameworks; Node is a great tool for building frameworks Andmany is available, such as cluster management, inter-process communicatio N, Web frameworks,network traffic collection tools, game engines and many others. Before dive into any of the thoseyou should be familiar with Node ' s infrastructure and what it provides to these building Blocks.
Original
Prerequisites for reading this book
This book assumes that you did not know anything about node before, but the code of various examples is written in JS, so familiarity with JS is helpful to understand the language.
PrerequisitesThis book does not assume you has any prior knowledge of Node, but the code examples is Writtenin Javascrip T, so familiarity with the JavaScript language would help.
Original
Practice
This book will have exercises in some sections, you can find the answers to these exercises at the end of the book, but I suggest you do it yourself first, the tricky place to check this book or visit http://nodejs.org to see the full API documentation.
Exercisesthis book had exercises in some chapters. At the end of the "this" can find the exercisesolutions, but I advise your to try do them yourself. Consult the COMPREHENSIVEAPI documentation on the official http://nodejs.org¹website.
Original
Source
You can find some source code and exercises for this book on GitHub:
Https://github.com/pgte/handson_nodejs_source_code
or download them directly:
Https://github.com/pgte/handson_nodejs_source_code/zipball/master
Source codeyou can find some of the source code and exercises used in this book on Github:https://github.com/pgte/handson_ Nodejs_source_code²or you can download it directly:https://github.com/pgte/handson_nodejs_source_code/zipball/ Master³
Original
Guide direction of the book
After reading this book, you will learn about the node API and be able to work on things that are based on node (such as adapters, frameworks, and modules) and let's get started.
Where'll this book leads you? By the end of it, you should understand the Node API and is able to pursue the exploration of otherthings built on top of It, being adaptors, frameworks and modules. Let ' s get started!
Original
"Hands-on node. js"-Introduction