Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm doing something pretty similar to rumpetroll (it is fully functional rumpetroll now, but we will add more features) using Backbone Model View Collections as my 'Sprites'. The code isn't public yet, but me and a friend have some plans for it. The only thing different is that we've completely dropped use of Backbone.sync, for the sole reason that the method based approach does not fit very cleanly into what we are doing and websockets. So we have one model as a 'dispatcher' instead, to which all models send messages which are transmitted over websockets. All sprites communicate via attribute change events which is a really good use of Backbone. On the server a tiny node.js wrapper uses Redis pub-sub to relay messages out to other clients.

The code is 'out there' but private, so if you want to take a peek at it, please contact me directly.

Thanks for a great framework.



I'd love to take a peek, if you want to mail an invite to jashkenas at gmail.

Replacing Backbone.sync is totally legit -- and is indeed what having Backbone.sync in a single place is intended for. There are many good paths to data persistence: REST/CRUD, RPC, aggregated JSON, CouchDB or Mongo, LocalStorage, and so on. Backbone.sync is just the default implementation for the common case.

I think that one of the more exciting things about JS development these days, is how open and flexible the patterns still are.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: