Tag Archives: backbone.js

Backbone Antipatterns

Backbone.js deserves a lot of credit for bringing MVC to mainstream client-side Javascript development. That said, many beginners ask what the ‘right way’ of doing something with Backbone is. The bad news is that there’s not necessarily a ‘right way’ … Continue reading

Posted in Javascript | Tagged | 17 Comments

Backbone Is Not Enough

Having spent the last 18 months or so working with Backbone.js, I’ve formed the following opinion: Backbone is not enough for building large single-page applications (SPAs). Sure, you and your team may be able to get your app across the … Continue reading

Posted in Javascript, Opinion | Tagged , , , | 8 Comments

Testing Backbone Views with QUnit and Sinon

Unit-testing Backbone Views is hard. You need to cover enough for the test to be meaningful (for example DOM updates and server calls), without getting too tangled up in gory details. In this post I’ll talk about how we use … Continue reading

Posted in AJAX, Javascript, Testing | Tagged , , , , | Leave a comment

Backbone Boilerplate Vs. Rails Asset Pipeline

We recently shifted from Backbone Boilerplate to the Rails Asset Pipeline for generating the various assets (Javascript, CSS, HTML, images, etc) that comprise teamstuff.com, a single-page app. In this post I’ll talk about our motivations for making the shift, what we had to change to get … Continue reading

Posted in AJAX, Javascript, Tools | Tagged , , | 4 Comments

An Identity Map for Backbone.js

One problem with single-page apps is that application state can stick around for longer than it would in a more traditional request-response web app. Because your users aren’t refreshing the page very often, you can have JavaScript objects sitting around … Continue reading

Posted in Javascript | Tagged , | 6 Comments

Efficient Stateful Views With Backbone, Part 2: Collections & Animations

In Part 1 of this blog series, we saw how UI state could be maintained efficiently in a Backbone app by introducing view-management infrastructure and retaining references to views. In Part 2, I’m going to talk about how this strategy … Continue reading

Posted in AJAX, Javascript | Tagged , | 2 Comments

Efficient Stateful Views with Backbone.js, Part 1

One of the good things about single-page apps is that it’s possible for them to remember UI state within a page. If an area of the page is hidden from the user, and then redisplayed later, you’re able to display … Continue reading

Posted in AJAX, Javascript | Tagged , , | 6 Comments

Building a shared calendar with Backbone.js and FullCalendar: A step-by-step tutorial

In a prior post, I explained how Backbone.js can be used to implement cascading select boxes. However, this was pretty much just a read-only affair, and these were relatively simple HTML elements. How does Backbone fare creating, updating and deleting … Continue reading

Posted in AJAX, Javascript | Tagged , , | 60 Comments

Cascading Select Boxes with Backbone.js: A Step-by-Step Tutorial

Up until recent years, client-side Javascript development has resembled the wild-west from a software design perspective. Libraries like jQuery have certainly helped, but with the rise of Single-Page Applications, jQuery alone doesn’t provide enough of an overall framework for large-scale … Continue reading

Posted in AJAX, Javascript | Tagged | 25 Comments