Backbone.js Blueprints

Backbone.js Blueprints
eBook: $29.99
Formats: PDF, PacktLib, ePub and Mobi formats
save 15%!
Print + free eBook + free PacktLib access to the book: $79.98    Print cover: $49.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Table of Contents
Sample Chapters
  • Gain insights into the inner working of Backbone to leverage it better
  • Exploit Backbone combined with the features of a Node powered server
  • Learn how to build seven step-by-step frontend applications

Book Details

Language : English
Paperback : 256 pages [ 235mm x 191mm ]
Release Date : May 2014
ISBN : 1783286997
ISBN 13 : 9781783286997
Author(s) : Andrew Burgess
Topics and Technologies : All Books, Game Development, Mobile Application Development, Open Source

Table of Contents

Chapter 1: Building a Simple Blog
Chapter 2: Building a Photo-sharing Application
Chapter 3: Building a Live Data Dashboard
Chapter 4: Building a Calendar
Chapter 5: Building a Chat Application
Chapter 6: Building a Podcast Application
Chapter 7: Building a Game
  • Chapter 1: Building a Simple Blog
    • Setting up the application
    • Starting with the server
    • Creating the template
    • Adding the public folder
    • Beginning the Backbone code
      • Creating a model and collection
    • Performing a quick and dirty test
    • Writing some views
      • The PostListView class
      • The PostsListView class
    • Using our views
    • Creating a router
    • Viewing a post
    • Creating new posts
    • Adding comments
      • Serving comments
      • Comment views
    • Summary
  • Chapter 2: Building a Photo-sharing Application
    • Creating user accounts
    • Creating our application navigation
    • Uploading photos
    • Sending photos from the server to the client
    • Creating profile pages
    • Creating the individual photo page
    • Following users
    • Displaying a followed user's photos
    • Summary
  • Chapter 3: Building a Live Data Dashboard
    • Planning our application
    • Setting up precompiled templates
    • Creating the models
    • Creating controls
      • Including Bootstrap
    • Starting the router
    • Building the CreateEventView class
    • Creating the events table
    • Deleting a record
    • Editing event records
    • Making it live
    • Sorting events
    • Summary
  • Chapter 4: Building a Calendar
    • Planning our application
    • Creating the model and collection
    • Creating the month view
      • Building the week row
      • Building the day cells
    • Creating the individual day screen
    • Writing the server code
    • Summary
  • Chapter 5: Building a Chat Application
    • Outlining the application
    • Setting up the application
    • Preparing our template
    • A word about Socket.IO
    • Creating modules
    • Creating users
    • Building the layout
    • Starting the router
    • Letting users join the fun
    • Joining a room
    • Building the chat module
    • Back to the controller
    • Adding some other routes
    • Writing CSS
    • Summary
  • Chapter 6: Building a Podcast Application
    • What are we building?
    • Building user accounts
    • Subscribing to and storing podcasts
    • Preparing index.ejs
    • Creating our models and collections
    • Building the navigation
    • Displaying podcasts
    • Creating a layout
    • Beginning the router
    • Subscribing to new podcasts
    • Displaying the list of episodes
    • Displaying episodes
    • Summary
  • Chapter 7: Building a Game
    • What are we building?
    • User accounts
    • Templates
    • Creating the game data
    • Writing the models
      • Splitting up words
    • Writing the tokens view
    • Views of the clues
    • Creating the guess view
    • Building the info view
    • Wrapping our views in a GameView class
    • Starting the router
    • Creating the home view
    • Building a scoreboard
    • Writing the navigation
    • Adding new words
    • Summary

Andrew Burgess

Andrew Burgess writes code and writes about code. While he dabbles with around half a dozen different programming languages, JavaScript is his favorite and is also his first love. He's been writing tutorials for Nettuts+ since 2009, and he has been creating screencasts for Tuts+ since 2012. He's written a few small e-books on other web development topics; some of them are:

  • Getting Good with Git, Rockable Press
  • Getting Good with JavaScript, Rockable Press
  • Getting Good with PHP, Rockable Press
Sorry, we don't have any reviews for this title yet.

Code Downloads

Download the code and support files for this book.

Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


- 2 submitted: last submission 15 Jul 2014

Page No: 14 | Errata type: Code

In the code snippet of the get route, the line:

posts.find(function (results)

Should be:

posts.find(function (err, results)


Page no: 20 | Errata type: Code

In the code snippet:

The line: var pv = new PostsListView({ collection: this.posts }

Should be: var pv = new PostsListView({ collection: this.posts });


Page no: 27 | Errata type: Code

The line: var post = new Post(commentAttrs);

Should be: var post = new Post(postAttrs);

Page No: 39 | Errata type: Code

The line: db.findOne({ id: id }, function (user) {
Should be: db.findOne({ id: id }, function (err, user) {

Page No: 43 | Errata type: Code

The line: users.findOne({ username: userAttrs.username }, function (existingUser) {

                 if (!existingUser) {

                 users.insert(userAttrs, function (user) {

Should be:  users.findOne({ username: userAttrs.username }, function (err, existingUser) {

                       if (!existingUser) {

                      users.insert(userAttrs, function (err, user) {

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

Backbone.js Blueprints +    Haskell Data Analysis Cookbook =
50% Off
the second eBook
Price for both: $43.05

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Discover seven different ways to create your own frontend Backbone.js applications
  • Create complex interfaces while keeping the code adaptable through Backbone Views
  • Control your applications' screens with simplicity through a Backbone router
  • Utilize Marionette and Chaplin, the Backbone extension frameworks
  • Build a Node.js server to manage the models your frontend application sends to it and requests from it
  • Work with templates that manage the heavy lifting of your view
  • Precompile your view for extra efficiency
  • Use Backbone extension libraries to create effective applications with less coding

In Detail

Backbone.js is an open source, JavaScript library that helps you to build sophisticated and structured web apps. It's important to have well-organized frontend code for easy maintenance and extendability. With the Backbone framework, you'll be able to build applications that are a breeze to manage.

In this book, you will discover how to build seven complete web applications from scratch. You'll learn how to use all the components of the Backbone framework individually, and how to use them together to create fully featured applications. In addition, you'll also learn how Backbone thinks so you can leverage it to write the most efficient frontend JavaScript code.

Through this book, you will learn to write good server-side JavaScript to support your frontend applications. This easy-to-follow guide is packed with projects, code, and solid explanations that will give you the confidence to write your own web applications from scratch.


This book is an easy-to-follow guide which is full of examples that will take you through building seven very different web applications with Backbone. The code is broken down into manageable bites and then thoroughly explained.

Who this book is for

If you are ready to learn about building frontend applications in Backbone, this is the book for you. Perhaps you've dipped your toe into Backbone and are ready to take the plunge. Even if you haven't, this book will teach you everything you need to know to build solid frontend apps with Backbone. You'll need to be pretty good at JavaScript and have a working knowledge of HTML and CSS, but other than that, you're good to go!

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software