josephg / ShareJS

Collaborative editing in any app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Backbone.js implementation?

kctess5 opened this issue · comments

I'm about to try to use this on a pretty full scale web app that I am making which uses backbone.js very heavily. This seems like something that could go along very well with Backbone as it is basically json driven, but I'm not quite sure where to start.

It seems that a lot of what this library does is hidden behind the scenes, which is great if you are doing something pretty simple, but makes complicated things challenging.

Considering that I am going to have to figure something out for myself, I might as well opensource my changes - I would just like a little bit of direction to get started in the right way so that any new code will play nicely with the old.

To complexify things further, the page that is doing the most intense rendering pulls information from several different MongoDB collections on load, so I will need to figure out how to deal with pathing on the server side.

Please give me your thoughts and suggestions :D

Instead of wrapping ShareJS in a Backbone model, I'd recommend using something like racer which is actually backed by ShareJS (https://github.com/codeparty/racer). You get a higher level API that looks almost like a more powerful version of a Backbone model (documented here: http://derbyjs.com/#models)