Category Archives: Backbone

Hands-on Backbone.js Screencasts

I’ve been talking about this for what seems like an eternity in Internet time: earlier this week my 4 part screencast series on Backbone.js was released through PragProg! It’s a hands-on, no-fluff walk through of all the major parts of … Continue reading 

Also posted in Javascript, Screencast, WatchMeCode | 4 Comments

I’m Wring A Book On Building Backbone Plugins

A few weeks ago I published a screencast on building Backbone plugins (paid). In this screencast, I walk and talk through the steps that I take to build, test, package and deploy some of the plugins and projects that I build … Continue reading 

Also posted in Books, Jasmine, WatchMeCode | 8 Comments

Why Should I Use Backbone.Marionette Instead Of … ?

There’s a question on StackOverflow from someone that wants to know what the real differences are between the various Backbone-based application frameworks. While I can’t really answer the question in terms of what the differences are, I can provide more … Continue reading 

Also posted in Analysis and Design, Javascript, Marionette, Messaging, Open Source, Philosophy of Software, Tools and Vendors | 17 Comments

$(function(){…}) vs (function($){…})($) or DOMReady vs The Module Pattern

This was originally a StackOverflow question. I’m re-posting here because I think the question is fairly common, and I like the answer that I provided.  Why define anonymous function and pass it jQuery as the argument? This is the original … Continue reading 

Also posted in DOM, Javascript, JQuery, Principles and Patterns | 7 Comments

Backbone.Syphon: Serialize Form Inputs To JavaScript Objects

Working with form elements in a Backbone view can become very tedious very quickly. You will either end up writing a lot of repetitive code to read values from the form, or end up using a key-value-observer or data-binding solution … Continue reading 

Also posted in Backbone.Syphon, Javascript, JQuery, JSON | 21 Comments

Workflow In Backbone Apps: Triggering View Events From DOM Events

In my previous blog post, I talked about modeling an explicit workflow in JavaScript and Backbone application. The last code sample I showed had the implementation of the workflow object itself, but omitted all of the details of the views … Continue reading 

Also posted in Javascript, Workflow | 8 Comments

Modeling Explicit Workflow With Code, In JavaScript And Backbone Apps

A long time ago, in what seems to be a previous life at this point, I wrote a small blog post about modeling and creating an explicit return value from a dialog form in a Windows application. Fast forward a … Continue reading 

Also posted in AntiPatterns, Javascript, Principles and Patterns, Workflow | 14 Comments

Wrapping $.ajax In A Thin “Command” Framework For Backbone Apps

A large number of my recent client applications, built on Backbone, have been using straight jQuery AJAX calls. Sometimes its in combination with Backbone’s persistence method, but other times I end up using AJAX calls in place of Backbone calls. … Continue reading 

Also posted in AJAX, JQuery, Semantics, Underscore | 6 Comments

View Helpers For Underscore Templates

Underscore’s template engine lets you run any arbitrary JavaScript code that you want, within a template. You could write an entire JavaScript application within an underscore template if you want. But this is a really bad idea. Templates should be … Continue reading 

Also posted in Javascript, Marionette, Underscore | 17 Comments

Decoupling Backbone Apps From WebSockets

I’ve been doing a lot of work with web sockets lately, in my Backbone applications. And I’ve fallen in to a pattern that I really like, where my Backbone application doesn’t actually know anything about web sockets. All it knows … Continue reading 

Also posted in Javascript, Marionette, Pusher, SignalR, Socket.IO, Web Sockets | 9 Comments