Cover image for Full Stack Web Development with Backbone.js

Book description

Learn how to build a full-stack application with Backbone.js by taking advantage of JavaScript modules, workflow automation, and Backbone’s interface building blocks. With this practical guide, author Patrick Mulder takes experienced backend developers and JavaScript programmers through the steps necessary to create a fully functional single-page application.

Table of Contents

  1. Preface
    1. Who This Book Is For
    2. Who This Book Is Not For
    3. What This Book Will Do For You
    4. Why I Wrote This Book
    5. Other Resources
      1. The JavaScript Language
      2. jQuery and the DOM
      3. Other Backbone.js resources
      4. API references
    6. Feedback and Code Examples
    7. Conventions Used in This Book
    8. Using Code Examples
    9. Safari® Books Online
    10. How to Contact Us
    11. Acknowledgments
  2. 1. The Bigger Picture
    1. Before you get started
    2. Backbonify your Stack
      1. Using npm
      2. Local Backbone.js
      3. Backbone.js via Content-Delivery Networks
    3. Modules, Packages and Servers
      1. CommonJS Modules
      2. Beyond index.html
      3. Browserify
      4. Combining Express.js and Stitch
    4. When Things go Wrong
    5. Conclusions
  3. 2. Kickstarting Application Development
    1. Creating a Wireframe
    2. Decoupling State from the UI
      1. Models and Collections
      2. Views
      3. Backbone.js and MVC
    3. Preparing a Click Dummy
      1. Basic HTML and Style
      2. Building a Data Layer
      3. Basic Events
    4. Conclusions
  4. 3. Building the User Interface
    1. Referencing jQuery
    2. Interfacing the DOM
      1. Basic Rendering
      2. Bindings to Data Changes
      3. Basic View Templates
      4. Rendering a Collection
    3. Handling UI Events
    4. DRYer Views and ViewModels
    5. Conclusions
  5. 4. Router Basics
    1. Addressing State
      1. Preparing
      2. Defining Routes
      3. Navigating
    2. Orchestrating Views
      1. Preparing for a Layout View
      2. Parent and child views
    3. Conclusions
  6. 5. Transforming Collections
    1. Functional Enhancements
      1. Sorting
      2. Filtering
    2. Backbone.Obscura
    3. Conclusions
  7. 6. Advanced View Templates
    1. Views and Templates
      1. JST
      2. ECO
      3. Handlebars
      4. React and others
    2. Build Automation
      1. Grunt
    3. Conclusions
  8. 7. Synchronizing State
    1. Fetching Remote Movies
      1. RESTful Web Services
      2. Mocking an API
    2. Basic sync and fetch
      1. Asynchronous Effects
      2. Firebase
    3. Conclusions
  9. 8. Basic API Concerns
    1. Backend Services
      1. Proxies
    2. Building a Movies service
      1. Wrapping a Data Store
      2. Persistence
    3. Conclusions
  10. 9. Authentication
    1. Security in Browsers
    2. Cookies
      1. Signup
      2. Managing Sessions
    3. Sessions with Backbone
      1. A Navbar view
      2. A Modal View for Sign Up
      3. The Login Dialog
    4. The Session logic
      1. A New Session
      2. State of a Session
      3. Logout
    5. Conclusions
  11. 10. Automated Workflows
    1. Improving Productivity
    2. Dependencies with Bower
    3. Say Hello to Yeoman
    4. RequireJS
      1. Main.js
      2. Adding Modules
    5. Scaffolding components
    6. Conclusions
  12. 11. From Backbone To Thorax
    1. The Role of Frameworks
    2. Getting started
      1. Prepare Mock data
      2. Initializing the Application
    3. A Router Setup
    4. Thorax.Collection
    5. Rendering
    6. Conclusions
  13. A. Developing with JavaScript
    1. Installing Node
    2. Getting Functional with Underscore.js
      1. Collections and Arrays
      2. Functions
      3. Objects
      4. Utility
    3. jQuery Basics
      1. Selecting Elements
      2. Working with Events
      3. Ajax
  14. Index
  15. About the Author
  16. Colophon
  17. Copyright