OReilly Node.js for PHP Developers (2013).pdf
(
4879 KB
)
Pobierz
Node.js for PHP Developers
Daniel Howard
Node.js for PHP Developers
by Daniel Howard
Copyright © 2013 Daniel Howard. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are
also available for most titles (
http://my.safaribooksonline.com
)
. For more information, contact our corporate/
institutional sales department: 800-998-9938 or
corporate@oreilly.com
.
Editors:
Simon St. Laurent and Meghan Blanchette
Production Editor:
Kara Ebrahim
Copyeditor:
Jasmine Kwityn
Proofreader:
Kara Ebrahim
Indexer:
Potomac Indexing, LLC
Cover Designer:
Karen Montgomery
Interior Designer:
David Futato
Illustrator:
Rebecca Demarest
December 2012:
First Edition
Revision History for the First Edition:
2012-11-28
First release
See
http://oreilly.com/catalog/errata.csp?isbn=9781449333607
for release details.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly
Media, Inc.
Node.js for PHP Developers
, the image of the Wallachian sheep, and related trade dress are
trademarks of O’Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trade‐
mark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and author assume no
responsibility for errors or omissions, or for damages resulting from the use of the information contained
herein.
ISBN: 978-1-449-33360-7
[LSI]
Table of Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
1.
Node.js Basics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
The node and npm Executables 1
Stack Traces 7
Eclipse PDT 9
2.
A Simple Node.js Framework. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
An HTTP Server 21
Predefined PHP Variables 29
A PHP Example Page 42
3.
Simple Callbacks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Linearity 49
Making Code Linear 57
4.
Advanced Callbacks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Anonymous Functions, Lambdas, and Closures 66
PHP 5.3 69
PHP 4 73
5.
HTTP Responses. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Headers 90
Body 92
A PHP Example Page 97
6.
Syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
String Literals 109
Syntax Differences 112
iii
Plik z chomika:
krupix.one
Inne pliki z tego folderu:
Apress Foundation PHP 5 for Flash (2005).pdf
(29809 KB)
Apress Beginning Google Maps Applications with PHP and Ajax, From Novice to Professional (2006).pdf
(15742 KB)
Apress Beginning PHP and PostgreSQL 8, From Novice to Professional (2006).pdf
(17128 KB)
Apress Building Online Communities with Drupal, phpBB and WordPress (2006).pdf
(14661 KB)
Apress Beginning CakePHP, From Novice to Professional (2008).pdf
(3856 KB)
Inne foldery tego chomika:
Android Application Development Video Guide Poradnik
Apple iOS 5 and 6 Development eBooks Collection [PDF]
ASP.NET eBooks Collection [PDF]
books
Complete IT Books Pack
Zgłoś jeśli
naruszono regulamin