luke-siedle/backbone-interface — pull request #3 by objectivehtml (2013-12-18 17:26:33+00:00)
Title: Reworked Interface class. Now drastically simplified, and supports multiple interfaces...

Note, this is a complete rewrite of the code you provided. I wasn't a fan of using a property to assign an interface. And in addition, multiple interfaces weren't possible, or obvious.

Here is the implementation example I used for testing. Let me know if I am missing something obvious. I was going to create a repo for this change, but did a quick search and found your. Figure I would post it here.

Here is an example of my implementation. I am using Marionette.js in my application, but this implementation works without it too.

(function() {

"use strict";

MyApp.Views.ItemView = Marionette.ItemView.extend({
initialize: function(data);

this.test1();

this.test2();

}
});

var Interface1 = Backbone.Interface.extend({

test1: function() {
console.log('test1');
}

});
var Interface2 = Backbone.Interface.extend({

test2: function() {
console.log('test2');
}

});

MyApp.Views.ItemView.implements(Interface1);
MyApp.Views.ItemView.implements(Interface2);

}());