Node Web Development. JavaScript is no longer just for browsers and this exciting introduction to Node.js will show you how to build data-intensive applications that run in real time. Benefit from an easy, step-by-step approach that really works - Helion
ebook
Autor: David HerronTytuł oryginału: Node Web Development. JavaScript is no longer just for browsers and this exciting introduction to Node.js will show you how to build data-intensive applications that run in real time. Benefit from an easy, step-by-step approach that really works.
ISBN: 9781782163312
stron: 248, Format: ebook
Data wydania: 2013-07-19
Księgarnia: Helion
Cena książki: 139,00 zł
Osoby które kupowały "Node Web Development. JavaScript is no longer just for browsers and this exciting introduction to Node.js will show you how to build data-intensive applications that run in real time. Benefit from an easy, step-by-step approach that really works", wybierały także:
- Windows Media Center. Domowe centrum rozrywki 66,67 zł, (8,00 zł -88%)
- Ruby on Rails. Ćwiczenia 18,75 zł, (3,00 zł -84%)
- Przywództwo w świecie VUCA. Jak być skutecznym liderem w niepewnym środowisku 58,64 zł, (12,90 zł -78%)
- Scrum. O zwinnym zarządzaniu projektami. Wydanie II rozszerzone 58,64 zł, (12,90 zł -78%)
- Od hierarchii do turkusu, czyli jak zarządzać w XXI wieku 58,64 zł, (12,90 zł -78%)
Spis treści
Node Web Development. JavaScript is no longer just for browsers and this exciting introduction to Node.js will show you how to build data-intensive applications that run in real time. Benefit from an easy, step-by-step approach that really works eBook -- spis treści
- Node Web Development Second Edition
- Table of Contents
- Node Web Development Second Edition
- Credits
- About the Author
- Acknowledgement
- About the Reviewers
- www.PacktPub.com
- Support files, eBooks, discount offers and more
- Why Subscribe?
- Free Access for Packt account holders
- Support files, eBooks, discount offers and more
- Preface
- What this book covers
- What you need for this book
- Who this book is for
- Conventions
- Reader feedback
- Customer support
- Downloading the example code
- Errata
- Piracy
- Questions
- 1. About Node
- The capabilities of Node
- Server-side JavaScript
- Why should you use Node?
- Threaded versus asynchronous event-driven architecture
- Performance and utilization
- Is Node a cancerous scalability disaster?
- Server utilization, the bottom line, and green web hosting
- Whats in a name Node, Node.js, or Node.JS?
- Summary
- The capabilities of Node
- 2. Setting up Node
- System requirements
- Installing Node using package managers
- Installing on Mac OS X with MacPorts
- Installing on Mac OS X with Homebrew
- Installing on Linux from package management systems
- Installing the Node distribution from nodejs.org
- Installing Node on Windows using Chocolatey Gallery
- Installing the StrongLoop Node distribution
- Installing from source on POSIX-like systems
- Installing prerequisites
- Installing developer tools on Mac OS X
- Installing from source for all POSIX-like systems
- Maintaining multiple Node installs simultaneously
- Run a few commands; testing the commands
- Node's command-line tools
- Running a simple script with Node
- Launching a server with Node
- npm the Node package manager
- Starting Node servers at system startup
- Summary
- 3. Node Modules
- Defining a module
- Node modules
- Node's algorithm for resolving require(module)
- Module identifiers and path names
- Local modules within your application
- Bundling external dependencies with your application
- System-wide modules in NODE_PATH and elsewhere
- Complex modules modules as directories
- Node package manager
- The npm package format
- Finding npm packages
- Using the npm commands
- Getting help with npm
- Viewing package information
- Installing an npm package
- Installing native code modules on Windows
- Installing packages local to a module
- Eliminating duplicate modules installed beneath node_modules
- Listing the currently installed packages
- Package scripts
- Editing and exploring installed package content
- Updating outdated packages you've installed
- Uninstalling an installed npm package
- Developing and publishing npm packages
- npm configuration settings
- Package version strings and ranges
- CommonJS modules
- Demonstrating module encapsulation
- Summary
- Defining a module
- 4. HTTP Servers and Clients A Web Application's First Steps
- Sending and receiving events with EventEmitters
- EventEmitter theory
- HTTP server applications
- HTTP Sniffer listening to the HTTP conversation
- Web application frameworks
- Getting started with Express
- Walking through the default Express application
- Calculating the Fibonacci sequence with Express
- Computationally intensive code and the event loop
- Algorithmic refactoring
- Computationally intensive code and the event loop
- Making HTTP Client requests
- Calling a REST backend service from an Express application
- Implementing a simple REST server with Express
- Refactoring the Fibonacci application for REST
- Some RESTful Node modules
- Summary
- Sending and receiving events with EventEmitters
- 5. Implementing a Simple Express Application
- Express and the MVC paradigm
- Creating the Notes application code
- The Notes model
- The Notes home page
- Adding a new note (create)
- Viewing notes (read)
- Editing an existing note (update)
- Deleting notes (destroy)
- Changing the look of an Express application
- Scaling up and running multiple instances
- Summary
- 6. Data Storage and Retrieval
- Asynchronizing the Notes application
- Injecting the model configuration into routers
- The notes router
- Storing notes in files
- Configuring app.js
- Storing notes with the LevelUP data store
- Installing LevelUP
- LevelUP model code for Notes
- Configuring app.js for LevelUP
- Storing notes in SQL SQLite3
- Setting up a schema with SQLite3
- Model code
- Configuring app.js
- Storing notes the ORM way with the Sequelize module
- Schema setup and model code
- Configuring app.js
- Storing notes in MongoDB with Mongoose
- Implementing the Notes model in Mongoose
- Configuring app.js
- Summary
- Asynchronizing the Notes application
- 7. Multiuser Authorization, Deployment, Scaling, and Hosting
- User authentication
- Changes in app.js
- The Sequelize-based users model
- Routing module for the login, logout, and account pages
- Initializing the user table
- Running the Notes application
- Deploying Notes on Debian
- Scaling to use all cores on multi-core servers
- Deploying Notes on cloud hosting (AppFog)
- Summary
- User authentication
- 8. Dynamic Interaction between the Client and Server Application
- Adding real-time web features to Notes
- Introducing Socket.IO
- Initializing Socket.IO with Express
- Setting up the client code
- Events between the Notes server and client code
- Modifying the Notes model to send events
- Sending the events from the Notes server
- Browser-side event handlers
- Running the Notes application with Socket.IO
- Listening to the heartbeat and cleaning up when it stops
- Sending messages between users
- Socket.IO events for sending messages between users
- Data model to store messages
- Setting up client-side code for sending messages
- Dispatching messages between the client- and server-side
- Displaying messages to the user
- Running Notes and sending messages
- Summary
- 9. Unit Testing
- Testing asynchronous code
- Assert the simplest testing methodology
- Testing a model
- Executing the tests
- Testing router functions
- Diagnosing a failing test case
- Making it easy to run the tests
- Summary
- Index