چه کسانی این کتاب را می‌خوانند

دانشجوعلاقه‌مند یادگیری
کتابخوان حرفه‌ایلذت مطالعه
نویسندهالهام‌گیری

Node. Js in Practice

Alex R. Young, Marc Harter

قیمت نهایی

۴۰٬۰۰۰ تومان۴۹٬۰۰۰ تومان۱۸٪ تخفیف
  • تخفیف زمان‌دار−۹٬۰۰۰ تومان

۹٬۰۰۰ تومان صرفه‌جویی نسبت به قیمت اصلی

بلافاصله پس از خرید، فایل کتاب روی دستگاه شما آمادهٔ دانلود است.

تحویل فوری
پرداخت امن
ضمانت فایل
پشتیبانی

نسخه اصلی و اورجینال

فایل دیجیتال کامل و بدون دستکاری — همان نسخه‌ای که پس از خرید دریافت می‌کنید.

مشخصات کتاب

سال انتشار
۲۰۱۵
فرمت
PDF
زبان
انگلیسی
حجم فایل
۷٫۶ مگابایت
شابک
9781617290930، 9781638355182، 1617290939، 1638355185

دربارهٔ کتاب

Node.js in Practice is a collection of fully tested examples that offer solutions to the common and not-so-common issues you face when you roll out Node. You'll dig into important topics like the ins and outs of event-based programming, how and why to use closures, how to structure applications to take advantage of end-to-end JavaScript apps, and more.about the bookYou've decided to use Node.js for your next project and you need the skills to implement Node in production. It would be great to have Node experts Alex Young and Marc Harter at your side to help you tackle those day-to-day challenges. With this book, you can!Node.js in Practice is a collection of 115 thoroughly tested examples and instantly useful techniques guaranteed to make any Node application go more smoothly. Following a common-sense Problem/Solution format, these experience-fueled techniques cover important topics like event-based programming, streams, integrating external applications, and deployment. The abundantly annotated code makes the examples easy to follow, and techniques are organized into logical clusters, so it's a snap to find what you're looking for.what's inside• Common usage examples, from basic to advanced• Designing and writing modules• Testing and debugging Node apps• Integrating Node into existing systemsabout the readerWritten for readers who have a practical knowledge of JavaScript and the basics of Node.js. Node.js in Practice 1 brief contents 4 contents 6 foreword 14 preface 16 acknowledgments 17 Alex Young 17 Marc Harter 18 about this book 19 Chapter roadmap 19 Code conventions and downloads 20 Author Online forum 20 about the cover illustration 21 Part 1: Node fundamentals 22 Chapter 1: Getting started 24 1.1 Getting to know Node 25 1.1.1 Why Node? 25 1.1.2 Node’s main features 27 1.2 Building a Node application 29 1.2.1 Creating a new Node project 30 1.2.2 Making a stream class 30 1.2.3 Using a stream 31 1.2.4 Writing a test 33 1.3 Summary 34 Chapter 2: Globals: Node’s environment 36 2.1 Modules 37 Technique 1 : Installing and loading modules 37 Technique 2 : Creating and managing modules 38 Technique 3 : Loading a group of related modules 40 Technique 4 : Working with paths 42 2.2 Standard I/O and the console object 43 Technique 5 : Reading and writing to standard I/O 43 Technique 6 : Logging messages 45 Technique 7 : Benchmarking a program 46 2.3 Operating system and command-line integration 48 Technique 8 : Getting platform information 48 Technique 9 : Passing command-line arguments 49 Technique 10 : Exiting a program 50 Technique 11 : Responding to signals 52 2.4 Delaying execution with timers 53 Technique 12 : Executing functions after a delay with setTimeout 53 Technique 13 : Running callbacks periodically with timers 55 Technique 14 : 4Safely managing asynchronous APIs 56 2.5 Summary 59 Chapter 3: Buffers: Working with bits, bytes, and encodings 60 3.1 Changing data encodings 61 Technique 15 : Converting buffers into other formats 61 Technique 16 : Changing string encodings using buffers 62 3.2 Converting binary files to JSON 65 Technique 17 : Using buffers to convert raw data 65 3.3 Creating your own binary protocol 79 Technique 18 : Creating your own network protocol 79 3.4 Summary 84 Chapter 4: Events: Mastering EventEmitter and beyond 85 4.1 Basic usage 86 Technique 19 : Inheriting from EventEmitter 86 Technique 20 : Mixing in EventEmitter 89 4.2 Error handling 90 Technique 21 : Managing errors 90 Technique 22 : Managing errors with domains 92 4.3 Advanced patterns 94 Technique 23 : Reflection 94 Technique 24 : Detecting and exploiting EventEmitter 96 Technique 25 : Categorizing event names 98 4.4 Third-party modules and extensions 99 Technique 26 : Alternatives to EventEmitter 99 4.5 Summary 101 Chapter 5: Streams: Node’s most powerful and misunderstood feature 103 5.1 Introduction to streams 104 5.1.1 Types of streams 104 5.1.2 When to use streams 105 5.1.3 History 106 5.1.4 Streams in third-party modules 106 5.1.5 Streams inherit from EventEmitter 108 5.2 Built-in streams 109 Technique 27 : Using built-in streams to make a static web server 109 Technique 28 : Stream error handling 111 5.3 Third-party modules and streams 112 Technique 29 : Using streams from third-party modules 112 5.4 Using the stream base classes 115 Technique 30 : Correctly inheriting from the stream base classes 115 Technique 31 : Implementing a readable stream 117 Technique 32 : Implementing a writable stream 120 Technique 33 : Transmitting and receiving data with duplex streams 122 Technique 34 : Parsing data with transform streams 124 5.5 Advanced patterns and optimization 126 Technique 35 : Optimizing streams 126 Technique 36 : Using the old streams API 129 Technique 37 : Adapting streams based on their destination 130 Technique 38 : Testing streams 132 5.6 Summary 134 Chapter 6: File system: Synchronous and asynchronous approaches to files 135 6.1 An overview of the fs module 136 6.1.1 POSIX file I/O wrappers 136 6.1.2 Streaming 138 6.1.3 Bulk file I/O 138 6.1.4 File watching 139 6.1.5 Synchronous alternatives 139 Technique 39 : Loading configuration files 140 Technique 40 : Using file descriptors 141 Technique 41 : Working with file locking 142 Technique 42 : Recursive file operations 146 Technique 43 : Writing a file database 149 Technique 44 : Watching files and directories 153 6.2 Summary 155 Chapter 7: Networking: Node’s true “Hello, World” 157 7.1 Networking in Node 158 7.1.1 Networking terminology 158 7.1.2 Node’s networking modules 162 7.1.3 Non-blocking networking and thread pools 163 7.2 TCP clients and servers 164 Technique 45 : Creating a TCP server and tracking clients 164 Technique 46 : Testing TCP servers with clients 166 Technique 47 : Improve low-latency applications 168 7.3 UDP clients and servers 170 Technique 48 : Transferring a file with UDP 170 Technique 49 : UDP client server applications 174 7.4 HTTP clients and servers 177 Technique 50 : HTTP servers 177 Technique 51 : Following redirects 179 Technique 52 : HTTP proxies 183 7.5 Making DNS requests 186 Technique 53 : Making a DNS request 186 7.6 Encryption 188 Technique 54 : A TCP server that uses encryption 188 Technique 55 : Encrypted web servers and clients 191 7.7 Summary 194 Chapter 8: Child processes: Integrating external applications with Node 195 8.1 Executing external applications 196 Technique 56 : Executing external applications 197 8.1.1 Paths and the PATH environment variable 197 8.1.2 Errors when executing external applications 198 Technique 57 : Streaming and external applications 199 8.1.3 Stringing external applications together 200 Technique 58 : Executing commands in a shell 201 8.1.4 Security and shell command execution 202 Technique 59 : Detaching a child process 203 8.1.5 Handing I/O between the child and parent processes 204 8.1.6 Reference counting and child processes 205 8.2 Executing Node programs 206 Technique 60 : Executing Node programs 206 Technique 61 : Forking Node modules 207 Technique 62 : Running jobs 209 8.2.1 Job pooling 211 8.2.2 Using the pooler module 212 8.3 Working synchronously 213 Technique 63 : Synchronous child processes 213 8.4 Summary 215 Part 2: Real-world recipes 218 Chapter 9: The Web: Build leaner and meaner web applications 220 9.1 Front-end techniques 221 Technique 64 : Quick servers for static sites 221 Technique 65 : Using the DOM in Node 225 Technique 66 : Using Node modules in the browser 228 9.2 Server-side techniques 230 Technique 67 : Express route separation 230 Technique 68 : Automatically restarting the server 233 Technique 69 : Configuring web applications 236 Technique 70 : Elegant error handling 240 Technique 71 : RESTful web applications 243 Technique 72 : Using custom middleware 252 Technique 73 : Using events to decouple functionality 257 Technique 74 : Using sessions with WebSockets 259 Technique 75 : Migrating Express 3 applications to Express 4 263 9.3 Testing web applications 267 Technique 76 : Testing authenticated routes 267 Technique 77 : Creating seams for middleware injection 269 Technique 78 : Testing applications that depend on remote services 271 9.4 Full stack frameworks 277 9.5 Real-time services 278 9.6 Summary 279 Chapter 10: Tests: The key to confident code 281 10.1 Introduction to testing with Node 282 10.2 Writing simple tests with assertions 283 Technique 79 : 9Writing tests with built-in modules 284 Technique 80 : Testing for errors 286 Technique 81 : Creating custom assertions 289 10.3 Test harnesses 291 Technique 82 : Organizing tests with a test harness 291 10.4 Test frameworks 294 Technique 83 : Writing tests with Mocha 294 Technique 84 : Testing web applications with Mocha 297 Technique 85 : The Test Anything Protocol 301 10.5 Tools for tests 303 Technique 86 : Continuous integration 304 Technique 87 : Database fixtures 306 10.6 Further reading 312 10.7 Summary 313 Chapter 11: Debugging: Designing for introspection and resolving issues 314 11.1 Designing for introspection 315 11.1.1 Explicit exceptions 315 11.1.2 Implicit exceptions 316 11.1.3 The error event 316 11.1.4 The error argument 317 Technique 88 : Handling uncaught exceptions 317 Technique 89 : Linting Node applications 320 11.2 Debugging issues 321 Technique 90 : Using Node’s built-in debugger 321 Technique 91 : Using Node Inspector 327 Technique 92 : Profiling Node applications 329 Technique 93 : Debugging memory leaks 332 Technique 94 : Inspecting a running program with a REPL 337 Technique 95 : Tracing system calls 343 11.3 Summary 346 Chapter 12: Node in production: Deploying applications safely 347 12.1 Deployment 348 Technique 96 : Deploying Node applications to the cloud 348 Technique 97 : Using Node with Apache and nginx 353 Technique 98 : Safely running Node on port 80 356 Technique 99 : Keeping Node processes running 357 Technique 100 : Using WebSockets in production 359 12.2 Caching and scaling 363 Technique 101 : HTTP caching 363 Technique 102 : Using a Node proxy for routing and scaling 365 Technique 103 : Scaling and resiliency with cluster 368 12.3 Maintenance 372 Technique 104 : Package optimization 372 Technique 105 : Logging and logging services 374 12.4 Further notes on scaling and resiliency 377 12.5 Summary 378 Part 3: Writing modules 380 Chapter 13: Writing modules: Mastering what Node is all about 382 13.1 Brainstorming 384 13.1.1 A faster Fibonacci module 384 Technique 106 : Planning for our module 384 Technique 107 : Proving our module idea 387 13.2 Building out the package.json file 391 Technique 108 : Setting up a package.json file 391 Technique 109 : Working with dependencies 394 Technique 110 : Semantic versioning 398 13.3 The end user experience 400 Technique 111 : Adding executable scripts 400 Technique 112 : Trying out a module 402 Technique 113 : Testing across multiple Node versions 404 13.4 Publishing 406 Technique 114 : Publishing modules 406 Technique 115 : Keeping modules private 408 13.5 Summary 409 appendix: Community 412 A.1 Asking questions 412 A.2 Hanging out 413 A.3 Reading 413 A.4 Training by the community, for the community 414 A.5 Marketing your open source projects 414 index 416 A 416 B 416 C 416 D 417 E 418 F 419 G 419 H 419 I 420 J 420 K 420 L 420 M 420 N 421 O 422 P 422 Q 422 R 422 S 423 T 424 U 424 V 424 W 425 X 425 Z 425 Annotation Summary" Node.js in Practice" is a collection of fully tested examples that offer solutions to the common and not-so-common issues you face when you roll out Node. You'll dig into important topics like the ins and outs of event-based programming, how and why to use closures, how to structure applications to take advantage of end-to-end JavaScript apps, and more. Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications. About the BookYou've decided to use Node.js for your next project and you need the skills to implement Node in production. It would be great to have Node experts Alex Young and Marc Harter at your side to help you tackle those day-to-day challenges. With this book, you can"Node.js in Practice" is a collection of 115 thoroughly tested examples and instantly useful techniques guaranteed to make any Node application go more smoothly. Following a common-sense Problem/Solution format, these experience-fueled techniques cover important topics like event-based programming, streams, integrating external applications, and deployment. The abundantly annotated code makes the examples easy to follow, and techniques are organized into logical clusters, so it's a snap to find what you're looking for. Written for readers who have a practical knowledge of JavaScript and the basics of Node.js. What's InsideCommon usage examples, from basic to advancedDesigning and writing modulesTesting and debugging Node appsIntegrating Node into existing systemsAbout the AuthorsAlex Young is a seasoned JavaScript developer who blogs regularly at DailyJS. Marc Harter works daily on large-scale projects including high-availability real-time applications, streaming interfaces, and other data-intensive systems. Table of ContentsPART 1 NODE FUNDAMENTALS Getting started Globals: Node's environment Buffers: Working with bits, bytes, and encodings Events: Mastering EventEmitter and beyond Streams: Node's most powerful and misunderstood feature File system: Synchronous and asynchronous approaches Networking: Node's true "Hello, World" Child processes: Integrating external applications with Node PART 2 REAL-WORLD RECIPES The Web: Build leaner and meaner web applications Tests: The key to confident code Debugging: Designing for introspection and resolving issues Node in production: Deploying applications safelyPART 3 WRITING MODULESWriting modules: Mastering what Node is all about Summary Node.js in Practice is a collection of fully tested examples that offer solutions to the common and not-so-common issues you face when you roll out Node. You'll dig into important topics like the ins and outs of event-based programming, how and why to use closures, how to structure applications to take advantage of end-to-end JavaScript apps, and more. Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications. About the Book You've decided to use Node.js for your next project and you need the skills to implement Node in production. It would be great to have Node experts Alex Young and Marc Harter at your side to help you tackle those day-to-day challenges. With this book, you can! Node.js in Practice is a collection of 115 thoroughly tested examples and instantly useful techniques guaranteed to make any Node application go more smoothly. Following a common-sense Problem/Solution format, these experience-fueled techniques cover important topics like event-based programming, streams, integrating external applications, and deployment. The abundantly annotated code makes the examples easy to follow, and techniques are organized into logical clusters, so it's a snap to find what you're looking for. Written for readers who have a practical knowledge of JavaScript and the basics of Node.js. What's Inside About the Authors Alex Young is a seasoned JavaScript developer who blogs regularly at DailyJS. Marc Harter works daily on large-scale projects including high-availability real-time applications, streaming interfaces, and other data-intensive systems. Table of Contents

Node.js in Practice is a collection of fully tested examples that offer solutions to the common and not-so-common issues you face when you roll out Node. You'll dig into important topics like the ins and outs of event-based programming, how and why to use closures, how to structure applications to take advantage of end-to-end JavaScript apps, and more.

قیمت نهایی

۴۰٬۰۰۰ تومان