Category Archives: Underscore

JavaScript Mixins: Beyond Simple Object Extension

Mixins are generally easy in JavaScript, though they are semantically different than what Ruby calls a Mixin which are facilitated through inheritance behind the scenes. If you need a good place to start to understand how to build mixins with … Continue reading 

Also posted in ECMAScript, Javascript, Marionette, Principles and Patterns | 12 Comments

Extending Objects in Underscore

Underscore is a very nice library, it’s what Backbone JS is built on. What I’ve come to like about it is its ability to provide very helpful functions that let you more effectively work with sets of data. Below is … Continue reading 

| Leave a comment

Partially Applied Functions In JavaScript

I’m finding myself doing more and more functional programming with JavaScript lately – especially in recent days with this WinJS project I’m working on, and the heavy use of promises that it encourages. This feels a little odd to me, … Continue reading 

Also posted in Async, ECMAScript, Functional, Javascript, WinJS | 8 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, Backbone, JQuery, Semantics | 7 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 Backbone, Javascript, Marionette | 20 Comments