Author Archive

17
Feb

This is Part 3 of a series of tutorials. Here's Part 1 and Part 2. So we've covered models, collections, controllers, and the basic case of tying a view to a model's callbacks. Now we're going to cover tying a view to a collection. This gets a little hairy, so I'm going to keep it nice and simple to start. Note: As with most things, there are large number of ways you could do this. If you feel that you have a better way, feel free to

27
Jan

An Intro to Backbone.js: Part 2 – Controllers and Views

This is Part 2 of a series of tutorials. You can find Part 1 here. We're good with Backbone.Model. We're good with Backbone.Collection. We're good with Backbone.Events. So: Backbone.Controller: If you're coming from Rails land, you'll be pretty familiar with this guy, although it's got a pretty neat twist. You get to write your routes right in the controller. This is very, very nice to work with. var MyController = Backbone.Controller.extend({ routes : {

24
Jan

An Intro to Backbone.js: Part 1 – Models and Collections

This is Part 1 of a series of tutorials. You can find Part 2 here. JavaScript interpreters are FAST, and they're in every browser out there. You can run a rich application in the browser using only open technologies and built in browser-functionality, today. Backbone.js can help build it. It's a light-weight MVC for the browser - only ~1000 lines of code, and it's clean. There's no magic. It's mostly just a structure for the code