Node.js for PHP DevelopersIf you're an experienced PHP developer, you already have a head start on learning how to write Node.js code. In this book, author Daniel Howard demonstrates the remarkable similarities between the two languages, and shows you how to port your entire PHP web application to Node.js. By comparing specific PHP features with their Node counterparts, you'll also discover how to refactor and improve existing PHP 4 or PHP 5 source code. At the end, you'll have two fully functional codebases to provide to your users. You can update both of them simultaneously, using this book as a reference to important aspects of PHP and Node.js.
|
What people are saying - Write a review
User Review - Flag as inappropriate
To read
Contents
Chapter 1 Nodejs Basics | 1 |
Chapter 2 A Simple Nodejs Framework | 21 |
Chapter 3 Simple Callbacks | 47 |
Chapter 4 Advanced Callbacks | 65 |
Chapter 5 HTTP Responses | 89 |
Chapter 6 Syntax | 107 |
Chapter 7 Variables | 125 |
Chapter 8 Classes | 157 |
Other editions - View all
Common terms and phrases
Admin alternative syntax anonymous functions API call API function call API function returns argument associative array blocking PHP call stack callback function chapter code to Node.js codebases Content-Type conversion recipe convert PHP convert the PHP converted to Node.js created Eclipse PDT Find execute exports.serve filename Find/Replace following find-and-replace action following Node.js code following PHP code fopen foreach statement fs.write(fp function(error fwrite($fp global variable Hello world Here’s httpsvr.njs implementation ofa Node.js indexed array JavaScript JSON keyword lambda function language linear MySQL MySQL database njs file Node.js API Node.js conversion Node.js npm package Node.js object Node.js server null occurrence ofthe Operation Options PHP and Node.js PHP array PHP class PHP engine PHP example php file PHP to Node.js refactored Regular expressions Replace Replace/Find res.writeHead(200 return value sparse array stack trace static variable string typeof undefined User web server
