News for hackers. Stuff that matters.
Re:BackFire: Firebase bindings for Backbone.js by ianstormtaylor on Tuesday January 29, 2013 @03:46PM (#5136153)
This is seriously awesome. We hacked together our own weird version of this while working on Socrates—can't wait to try it out on our next project.
Re:BackFire: Firebase bindings for Backbone.js by jashkenas on Tuesday January 29, 2013 @05:32PM (#5136823)
@anant -- Could you talk a little bit about the bits you needed to build in order to get the Collection to synchronize with Firebase? Was it a piece of cake? Did you run into any trouble?
Re:BackFire: Firebase bindings for Backbone.js by anant on Tuesday January 29, 2013 @06:01PM (#5136975)
The bindings simply extend the Collection object and override certain methods on it (add, remove, etc.) to do the corresponding Firebase operations.

We did run into a few relatively minor issues; for example when doing a smart update to a collection, Backbone seems to trigger a remove event immediately followed by an add event for a model that hasn't changed.

We still have more work to do with the bindings (we don't have a Firebase.Model object for instance), but I don't expect any major roadblocks. All in all, piece of cake!

Re:BackFire: Firebase bindings for Backbone.js by jashkenas on Tuesday January 29, 2013 @06:08PM (#5137019)

    > All in all, piece of cake!
Glad to hear it!

    > when doing a smart update to a collection, Backbone seems 
    > to trigger a remove event immediately followed by an add 
    > event for a model that hasn't changed.
That certainly doesn't sound right -- if you've got something reproducible there, I'd encourage you to open a ticket.
Re:BackFire: Firebase bindings for Backbone.js by thruflo on Tuesday January 29, 2013 @06:00PM (#5136968)
FWIW having first contributed patches to the backbone-firebase lib, l got annoyed with it clobbering backbone.sync and rewrote a similar but slightly different binding here: https://github.com/thruflo/mobone/blob/master/firebase.coffe...
Re:BackFire: Firebase bindings for Backbone.js by knes on Tuesday January 29, 2013 @04:21PM (#5136372)
Awesome, would be great to see this for Angularjs too!
Re:BackFire: Firebase bindings for Backbone.js by anant on Tuesday January 29, 2013 @04:22PM (#5136379)
Thanks, AngularJS is definitely on our roadmap!
Re:BackFire: Firebase bindings for Backbone.js by mikeknoop on Tuesday January 29, 2013 @04:12PM (#5136311)
Awesome stuff. Is there an authentication mechanism built in somewhere?
Re:BackFire: Firebase bindings for Backbone.js by anant on Tuesday January 29, 2013 @04:18PM (#5136356)
Great question - the bindings can take a regular Firebase reference object instead of a URL as well. If you had authenticated the Firebase reference using any of the regular Firebase methods (like Simple Login), the collection will simply inherit them.
Re:BackFire: Firebase bindings for Backbone.js by anant on Tuesday January 29, 2013 @04:22PM (#5136373)
For reference, Simple Login is a convenient way to add authentication to a Firebase app using Facebook, Twitter, Persona, Github or just plain old email/password identities. More at https://www.firebase.com/docs/security/simple-login-overview...
Re:BackFire: Firebase bindings for Backbone.js by jimmytttt on Tuesday January 29, 2013 @04:18PM (#5136352)
The example ToDo contains: - Decrease entropy - Slam a revolving door

http://firebase.github.com/backfire/