Beginning Backbone.js

Book description

Beginning Backbone.js is your step-by-step guide to learning and using the Backbone.js library in your web projects. Backbone.js is one of the most popular JavaScript libraries among web developers, used to create modular, single-page web apps. This book takes you from downloading Backbone.js and its dependencies all the way to using more advanced libraries to structure your application architecture, and everything in between.

With a real-world, practical approach, you will learn how you can integrate Backbone.js into the center of your JavaScript stack, and create scalable applications. James Sugrue shows you how to implement all aspects of templating, work efficiently with RequireJS, and fully understand Grunt and all its plug-ins. Armed with this knowledge you'll be able to architect a continuous integration system that is key to real-world applications.

With the explosion of JavaScript-based applications on the web, the need for more structured approaches to code management is more important than ever. Backbone.js helps create applications that separate models from views, enabling developers to avoid spaghetti code. Beginning Backbone.js will gently guide you into this amazingly powerful library, and help you ramp up to building professional applications. Integrate Backbone.js into your work today with this indispensable book.

What you'll learn

  • Learn the importance of MVC approaches in software development

  • Learn why Backbone.js is so popular and how to integrate it into your JavaScript stack

  • Understand core Backbone.js concepts such as models, views, routers, and events

  • Test your application using the latest JavaScript testing tools

  • Create build scripts using Grunt.js to simplify your build and deployment workflow

  • Use additional libraries to build on the power of Backbone.js

  • Avoid common beginner errors and code using best practices

  • Who this book is for

    Beginning Backbone.js is for the web developer who is already confident with JavaScript, but who is keen to build larger, single-page web apps. If you want to introduce more structure, quality, and process to your web application using Backbone.js, and other leading JavaScript technologies, this is the book for you.

    Table of contents

    1. Title Page
    2. Contents at a Glance
    3. Contents
    4. About the Author
    5. About the Technical Reviewer
    6. Acknowledgments
    7. Introduction
    8. CHAPTER 1: An Introduction to Backbone.js
      1. What Is Backbone.js?
      2. Design Patterns for Web Applications
      3. Backbone Adoption in the Real World
      4. Getting Backbone Setup
      5. Summary
    9. CHAPTER 2: Getting Object-Oriented
      1. The Rise of JavaScript
      2. What Is an Object Anyway?
      3. JavaScript: The Basics
      4. Basic Syntax
      5. Making JavaScript Object-Oriented
      6. Object-Oriented Frameworks for JavaScript
      7. Summary
    10. CHAPTER 3: Backbone Models and Collections
      1. System Setup
      2. Backbone Models
      3. Backbone Collections
      4. Summary
    11. CHAPTER 4: Backbone View and Templating Libraries
      1. Code Setup
      2. Backbone Views
      3. Templating in Backbone
      4. Templating with Underscore
      5. Templating with Handlebars
      6. Templating with Mustache
      7. Which Templating Library to Use?
      8. Summary
    12. CHAPTER 5: Routers and Events
      1. Backbone Routers
      2. Backbone Events
      3. Summary
    13. CHAPTER 6: From Start to Finish: A Complete App Example
      1. Designing Your Application
      2. Application Code Structure
      3. First Steps: Dealing with Authentication
      4. Adding the Profile View
      5. Reusing the Profile View
      6. Adding Search Functionality
      7. Error Handling
      8. Summary
    14. CHAPTER 7: The Backbone Ecosystem
      1. Code Samples
      2. User Interface Components
      3. Models and Collection Extensions
      4. Developer Tools and Utilities
      5. Quick Reference
      6. Summary
    15. CHAPTER 8: Testing Your Backbone.js Application
      1. The Advantages of Test-Driven Development
      2. Testing with QUnit
      3. Sinon.JS
      4. Testing with Jasmine
      5. Summary
    16. CHAPTER 9: Using Grunt for Your Build Process
      1. An Introduction to Grunt
      2. Using Grunt for Your Project
      3. Project Scaffolding
      4. Some Useful Grunt Plug-Ins
      5. Summary
    17. CHAPTER 10: Extending Backbone with Marionette and Thorax
      1. Marionette
      2. Thorax
      3. Summary
    18. CHAPTER 11: Best Practices with Backbone
      1. General Best Practices
      2. Avoiding Memory Leaks
      3. Rendering Views
      4. View Management
      5. Network Performance
      6. Perceived Performance
      7. Summary
    19. CHAPTER 12: Creating a Manageable JavaScript Code Base
      1. Using RequireJS to Create Modular Applications
      2. Using Yeoman to Get Started Quickly
      3. Design Patterns for Backbone Applications
      4. Summary
    20. Index

    Product information

    • Title: Beginning Backbone.js
    • Author(s):
    • Release date: December 2013
    • Publisher(s): Apress
    • ISBN: 9781430263340