Backbone.js Essentials

Build amazing high-performance web applications using Backbone.js
Preview in Mapt

Backbone.js Essentials

Jeremy Walker

Build amazing high-performance web applications using Backbone.js

Quick links: > What will you learn?> Table of content

Mapt Subscription
FREE
$29.99/m after trial
eBook
$14.00
RRP $19.99
Save 29%
Print + eBook
$24.99
RRP $24.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$14.00
$24.99
$29.99 p/m after trial
RRP $19.99
RRP $24.99
Subscription
eBook
Print + eBook
Start 14 Day Trial

Frequently bought together


Backbone.js Essentials Book Cover
Backbone.js Essentials
$ 19.99
$ 14.00
ReactJS by Example - Building Modern Web Applications with React Book Cover
ReactJS by Example - Building Modern Web Applications with React
$ 35.99
$ 25.20
Buy 2 for $31.50
Save $24.48
Add to Cart

Book Details

ISBN 139781784394790
Paperback180 pages

Book Description

This book offers insight into creating and maintaining dynamic Backbone.js web applications. It delves into the the fundamentals of Backbone.js and helps you achieve mastery of the Backbone library.

Starting with Models and Collections, you'll learn how to simplify client-side data management and easily transmit data to and from your server. Next, you'll learn to use Views and Routers to facilitate DOM manipulation and URL control so that your visitors can navigate your entire site without ever leaving the first HTML page. Finally, you'll learn how to combine those building blocks with other tools to achieve high-performance, testable, and maintainable web applications.

Table of Contents

Chapter 1: Building a Single-Page Site Using Backbone
What is Backbone?
Why choose Backbone?
A Brief History of Web Development
Benefits of Backbone and single-page applications
Backbone and Its Competitors
Summary
Chapter 2: Object-Oriented JavaScript with Backbone Classes
JavaScript's class system
The new keyword
Prototypal inheritance
Extending Backbone classes
Applying parent methods
Introducing Underscore
More Underscore
Summary
Chapter 3: Accessing Server Data with Models
The purpose of Models
Attributes, options, and properties
Getters and setters
Listening for events
Available events
Server-side actions
Return of Underscore
Summary
Chapter 4: Organizing Models with Collections
Working with Collections
Collections and Models
Adding to and resetting Collections
Indexing
Sorting
Events
Server-side actions
Underscore methods
Previously mentioned methods
Testing methods
Extraction methods
Ordering methods
Summary
Chapter 5: Adding and Modifying Elements with Views
Views are the core of Backbone-powered sites
Handling events
Rendering strategies
Summary
Chapter 6: Creating Client-side Pages with Routers
Backbone routers enable single-page applications
How Routers work
Backbone.history
Differences between routes and pages
Creating a new Router
Creating routes
Route styles
A note about routing conflicts
Trailing slashes
Redirects
404s and other errors
Routing events
Multiple routers
Page views
Summary
Chapter 7: Fitting Square Pegs in Round Holes – Advanced Backbone Techniques
Taking it up a notch
Methods in place of properties
Overriding a class constructor
Class mixins
Publish/subscribe
Wrapping widgets of other libraries
Summary
Chapter 8: Scaling Up – Ensuring Performance in Complex Applications
Backbone and performance
Causes of performance issues
CPU-related performance issues
Event delegation
Bandwidth-related performance issues
Memory-related performance issues
Summary
Chapter 9: What Was I Thinking? Documenting Backbone Code
Backbone and documentation
Documentation approaches
The non-documentation approach
The simple documentation approach
The robust documentation approach
Summary
Chapter 10: Keeping the Bugs Out – How to Test a Backbone Application
Testing in JavaScript?
Which library to use
Getting started with Mocha
Introducing mocks
Selenium
Summary
Chapter 11: (Not) Re-Inventing the Wheel – Utilizing Third-Party Libraries
The Backbone ecosystem
Dependency management with RequireJS
External dependency management with Bower
Paginating with Backbone Paginator
Rendering tables with Backgrid.js
Templating with Handlebars
Automating tasks with Grunt
New syntax with CoffeeScript
Making life easier with BackSupport
Summary
Chapter 12: Summary and Further Reading
Putting it all together
What's Syapse?
Building your own Syapse
Further reading
Summary

What You Will Learn

  • Architect a single-page web application using Backbone.js
  • Easily transmit data to and from a server-side API (RESTful or not) using Backbone's Models and Classes
  • Add and modify DOM elements with Backbone Views, and create browsable client-side pages with Routers
  • Document your Backbone.js logic, with or without popular tools such as JSDoc or Docco, to ensure long-term maintainability
  • Prevent bugs and ease refactoring by testing your code with frameworks such as QUnit, Mocha, or Buster and auxiliary tools such as Sinon
  • Use Backbone.js's sister library, Underscore, to realize the full power of a Backbone application
  • Explore advanced Backbone techniques and save time and effort by using the most powerful third-party tools available

Authors

Table of Contents

Chapter 1: Building a Single-Page Site Using Backbone
What is Backbone?
Why choose Backbone?
A Brief History of Web Development
Benefits of Backbone and single-page applications
Backbone and Its Competitors
Summary
Chapter 2: Object-Oriented JavaScript with Backbone Classes
JavaScript's class system
The new keyword
Prototypal inheritance
Extending Backbone classes
Applying parent methods
Introducing Underscore
More Underscore
Summary
Chapter 3: Accessing Server Data with Models
The purpose of Models
Attributes, options, and properties
Getters and setters
Listening for events
Available events
Server-side actions
Return of Underscore
Summary
Chapter 4: Organizing Models with Collections
Working with Collections
Collections and Models
Adding to and resetting Collections
Indexing
Sorting
Events
Server-side actions
Underscore methods
Previously mentioned methods
Testing methods
Extraction methods
Ordering methods
Summary
Chapter 5: Adding and Modifying Elements with Views
Views are the core of Backbone-powered sites
Handling events
Rendering strategies
Summary
Chapter 6: Creating Client-side Pages with Routers
Backbone routers enable single-page applications
How Routers work
Backbone.history
Differences between routes and pages
Creating a new Router
Creating routes
Route styles
A note about routing conflicts
Trailing slashes
Redirects
404s and other errors
Routing events
Multiple routers
Page views
Summary
Chapter 7: Fitting Square Pegs in Round Holes – Advanced Backbone Techniques
Taking it up a notch
Methods in place of properties
Overriding a class constructor
Class mixins
Publish/subscribe
Wrapping widgets of other libraries
Summary
Chapter 8: Scaling Up – Ensuring Performance in Complex Applications
Backbone and performance
Causes of performance issues
CPU-related performance issues
Event delegation
Bandwidth-related performance issues
Memory-related performance issues
Summary
Chapter 9: What Was I Thinking? Documenting Backbone Code
Backbone and documentation
Documentation approaches
The non-documentation approach
The simple documentation approach
The robust documentation approach
Summary
Chapter 10: Keeping the Bugs Out – How to Test a Backbone Application
Testing in JavaScript?
Which library to use
Getting started with Mocha
Introducing mocks
Selenium
Summary
Chapter 11: (Not) Re-Inventing the Wheel – Utilizing Third-Party Libraries
The Backbone ecosystem
Dependency management with RequireJS
External dependency management with Bower
Paginating with Backbone Paginator
Rendering tables with Backgrid.js
Templating with Handlebars
Automating tasks with Grunt
New syntax with CoffeeScript
Making life easier with BackSupport
Summary
Chapter 12: Summary and Further Reading
Putting it all together
What's Syapse?
Building your own Syapse
Further reading
Summary

Book Details

ISBN 139781784394790
Paperback180 pages
Read More

Read More Reviews

Recommended for You

ReactJS by Example - Building Modern Web Applications with React Book Cover
ReactJS by Example - Building Modern Web Applications with React
$ 35.99
$ 25.20
Flask By Example Book Cover
Flask By Example
$ 27.99
$ 19.60
Building an E-Commerce Application with MEAN Book Cover
Building an E-Commerce Application with MEAN
$ 27.99
$ 5.60
Learning Vue.js 2 Book Cover
Learning Vue.js 2
$ 35.99
$ 25.20
Learning Web Development with React and Bootstrap Book Cover
Learning Web Development with React and Bootstrap
$ 31.99
$ 22.40
Angular 2 By Example Book Cover
Angular 2 By Example
$ 35.99
$ 25.20