Cover image for Building Node Applications with MongoDB and Backbone

Book description

The enthusiasm behind Node doesn’t just reflect the promise of server-side JavaScript. Developers also have the potential to create elegant applications with this open source framework that are much easier to maintain. Follow author Mike Wilson as he builds a social network application oriented toward real-time updates. Through this, the book shows you how to build complete applications that combine the strengths of Node, the MongoDB scalable storage solution, and the Backbone toolkit for clean application design in the browser.

Table of Contents

  1. Building Node Applications with MongoDB and Backbone
  2. Preface
    1. Audience and Assumptions
    2. Organization
      1. Part I: Introduction
      2. Part II: Building a Social Network
    3. Conventions Used in This Book
    4. Using Code Examples
    5. Safari® Books Online
    6. How to Contact Us
  3. I. Introducing Node.js, Backbone.js, and MongoDB
    1. 1. Introduction and Overview
      1. Building a Social Network
      2. Model-View-Controller (MVC)
      3. Pure JavaScript
    2. 2. Node.js
      1. Installing Node.js
      2. Express
        1. Templates
      3. Events
      4. Socket.io
      5. Modules and CommonJS
    3. 3. Backbone.js
      1. Model
      2. View
        1. View Template
      3. Collection
        1. Sync
      4. Router and History
    4. 4. MongoDB
      1. Accessing Data
        1. Writing
        2. Querying
        3. Indexes
        4. MapReduce
      2. Working with Node.js
      3. Concurrent Access
  4. II. Building a Social Network
    1. 5. Setting Up the Project
      1. Directory Structure
        1. File Listing
      2. Package Definition
      3. Web Server
        1. Index Template
        2. Application JavaScript
          1. Application class
          2. Index view object
    2. 6. Authentication
      1. Account
      2. Routing
        1. Checking for Authentication
        2. Authentication Handler
      3. Registration
        1. Registration Template
        2. Registration Handler
      4. Login
        1. Login Template
        2. Login Handler
      5. Forgot Password
        1. Forgot Password Template
        2. Forgot Password Handler
      6. Reset Password
        1. Reset Password Templates
        2. Reset Password Handler
      7. Putting It Together
        1. Node.js
    3. 7. The User Interface
      1. Account Details
        1. Account Details Template
        2. Account Details Handler
      2. Contact List
      3. Activity Stream
        1. Activity Stream Template
        2. Activity Stream Handler
      4. Data Model
      5. Putting It Together
        1. Backbone
        2. Node.js
    4. 8. Making Friends
      1. Contact List
        1. Contact List Template
        2. Contact List Handler
      2. Add Contact
        1. Add Contact Template
        2. Add Contact Handler
      3. Remove Contact
        1. Remove Contact Template
        2. Remove Contact Handler
      4. Commenting
        1. Comment Template
        2. Comment Handler
      5. Putting It Together
        1. Backbone
          1. Router
          2. Index
        2. Node.js
          1. Main Express application
          2. Account model
    5. 9. Chat
      1. Refactoring
      2. Connecting to the Chat Server
        1. Backbone
        2. Node.js
      3. Sending and Receiving Chat Messages
        1. Backbone
        2. Node.js
      4. Putting It Together
        1. Backbone
        2. Node.js
    6. 10. Activities in Real Time
      1. Adding Custom Events
        1. Triggering Events
        2. Adding Listeners
      2. Contact Login Notification
        1. Backbone.js
        2. Node.js
      3. Status Updates
        1. Backbone.js
        2. Node.js
      4. Putting It Together
        1. Backbone.js
        2. Node.js
        3. Static Files
  5. Glossary
  6. About the Author
  7. Colophon
  8. Copyright