Category Archives: javascript

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 

| 17 Comments

Load External JavaScript Files in on{X}

The other day I talked about the things I was playing with in on{X}. I like to use other frameworks or JavaScript libraries when I write my codez. Of course I’m going to want to do the same when writing … Continue reading 

| 4 Comments

Hack Your Life with On{X}

The other day I saw some tweets, and didn’t think much of it until about the third one. I usually try to avoid knee-jerk reactions to cool things on Twitter until I see about two or three followers which have … Continue reading 

| 1 Comment

Anders Hejlsberg Is Right: You Cannot Maintain Large Programs In JavaScript

There’s a quote over on a Channel 9 video of Anders Hejlsberg: Erik Meijer: Are you saying you cannot write large programs in JavaScript? Anders Hejlsberg: No, you can write large programs in JavaScript. You just can’t maintain them. With … Continue reading 

| 29 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 

| 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 

| 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 

| 7 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 

| 14 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 

| 16 Comments

Executing A Project-Specific Node/NPM Package A-la “bundle exec”

It’s no secret that I love NodeJS, though I really haven’t blogged about it much (if at all). Frankly, I think Node and NPM are going to be eating Ruby, RubyGems and Bundler’s $25,000 lunch – at least on OSX. … Continue reading 

| 4 Comments