Monthly Archives: October 2011

Rebuilding My Backbone.js Plugins With Modules, SRP and More

In the last few weeks, I’ve rebuilt and refactored a large amount of JavaScript code in both my Backbone.ModelBinding and Backbone.Memento plugins. In the process, I re-learned several object oriented design principles and how they apply to JavaScript. I also … Continue reading 

Posted in Backbone, Backbone.Memento, Backbone.ModelBinding, Javascript, Refactoring | Leave a comment

Tips For Using Backbone.js Routers With HTML5 PushState

IMPORTANT UPDATE! Jeremy Ashkenas pointed out that this won’t work in Internet Explorer (or other browsers that don’t support PushState). I had tested this, but apparently I didn’t hit the Back button in IE, in my testing. The Back button, … Continue reading 

Posted in Backbone, HTML5, Javascript, PushState | 8 Comments

A JSFiddle To Build Backbone.js Fiddles

I’m tired of building JSFiddle environments every time I need to set one up for a blog post, to show some Backbone.js code. So… I built: a JSFiddle that has nothing but the JavaScript libraries that I use for my … Continue reading 

Posted in Backbone, Javascript, JSFiddle | 6 Comments

Quick Hack To Work Around Jasmine-jQuery Fixture Limitations

I use Jasmine-jQuery to help out my Jasmine tests. It’s a great little plugin and generally makes my life easier. I ran into an issue today, though, and rather than trying to fix the real problem (which I think is … Continue reading 

Posted in Jasmine, Javascript | 1 Comment

Backbone.js: Getting The Model For A Clicked Element

I see variations of these questions on StackOverflow quite frequently: I have an HTML element rendered for each model in my collection. How do I get the model for the item that I clicked? or I rendered all my models … Continue reading 

Posted in Backbone, HTML5, Javascript | 38 Comments

SEO And Accessibility With HTML5 PushState, Part 3: The Video

Last weekend, I gave a presentation on HTML5 PushState using PushState, at Pablo’s Fiesta (I know, I know… a presentation at an open spaces conf. ya. :P) and David Ohara was kind enough to record it and upload it to … Continue reading 

Posted in Accessibility, Backbone, HTML5, Javascript, PushState, SEO | 2 Comments

JavaScript Has Built-In Mix-ins With ‘apply’ Or ‘call’

While I was running the Object-Oriented JavaScript discussion / demo at Pablo’s Fiesta this weekend, Jimmy Bogard asked me to try something fun. I had a small constructor function defined with a couple of methods defined directly in it. I … Continue reading 

Posted in Uncategorized | 9 Comments