Category Archives: Model-View-Controller

Handling DOM Events With EmberJS Views And Controllers

Hot on the heels of picking up Ember and starting to learn it, I think I’ve actually learned something useful! I certainly hope I have, at least. Otherwise, I’m going to be in trouble soon. In my EmberCloneMail app, I … Continue reading 

Also posted in DOM, Ember, Javascript, JQuery, Model-View-Presenter | 9 Comments

EmberJS: Initial Impressions (Compared To Backbone)

Hey! This article references a pre-release version of Ember.js. Now that Ember.js has reached a 1.0 API the code samples below are no longer correct and the expressed opinions may no longer be accurate. Just keep that in mind when … Continue reading 

Also posted in Backbone, Ember, Handlebars, Javascript, Model-View-Presenter, Rails, Ruby, Sinatra | 27 Comments

JavaScript File & Folder Structures: Just Pick One

Rails wants you to put specific files in specific folder structures, based on the object type that will be in the file. Java demands that files in a folder structure are namespaced by that folder structure. VisualStudio also makes it … Continue reading 

Also posted in AntiPatterns, Backbone, Javascript | 7 Comments

Backbone.js Is Not An MVC Framework

I’ve seen this question / statement / argument more than a few dozen times. I don’t particularly care whether or not people try to understand Backbone in terms of MVC frameworks, because that’s how we learn. We adapt new ideas … Continue reading 

Also posted in Backbone, Design Patterns, Javascript, Model-View-Presenter | 25 Comments

Zombies! RUN! (Managing Page Transitions In Backbone Apps)

UPDATE: Backbone.EventBinder Given the continuous feedback that I get from this blog post, I decided to extract my “EventBinder” object that I had built in to Backbone.Marionette for solving this problem, in to it’s own Backbone plugin and repository.  Read … Continue reading 

Also posted in Backbone, Javascript | 75 Comments

Test-Driving Backbone Views With JQuery Templates, The Jasmine Gem, and Jasmine-JQuery

In my current production rails app, I use Cucumber to test my backbone code as an integration test – to make sure that the entire system is playing nice. Over the weekend, I decided to dive a little deeper into my … Continue reading 

Also posted in Backbone, JQuery, Ruby, Unit Testing | 8 Comments

Don’t Execute A Backbone.js Route Handler From Your Code

I was working on a sample Backbone.js application and I ran into a scenario that seemed like it should have been simple on the surface, but was causing me a tremendous amount of headache. Here’s the basic functionality that I … Continue reading 

Also posted in Analysis and Design, AntiPatterns, Backbone, Javascript, Principles and Patterns | 34 Comments

Testing Out Embedding Of JSFiddle

This is mostly just a test to see if I can get a JSFiddle embedded into my blog post. The fiddle is a small backbone app that I’ve been playing with, to try out some different architectural ideas. It’s nothing … Continue reading 

Also posted in Backbone, Javascript, JQuery, User Experience | 10 Comments

Stop Using Backbone As If It Were A Stateless Web Server

In the web development world with MVC based back-end servers, nearly everything is kicked off with routes. Look at rails for example. If you want a list of items, you hit /items and the router executes the index method on … Continue reading 

Also posted in AntiPatterns, Backbone, Javascript, JQuery, Pragmatism, Principles and Patterns | 27 Comments

Knockout Style Data-Bind Attributes For Backbone

Hot on the heels of my Backbone.ModelBinding plugin release, I pushed a significant update out to the github repository. Included in this release is the rest of the form input types, including radio button groups, select boxes, etc (be sure … Continue reading 

Also posted in Backbone, Backbone.ModelBinding, Javascript | 7 Comments