andyet/Capsule — Issue #8: Using Capsule client-side and have the server just act as pneumatic tube?
Author: aliasone
Created: 2011-10-08 05:27:46+00:00
State: open

The framework I'm building for my application is doing something similar to this. The difference is that it doesn't maintain a backbone instance of the model on the server.

When a model changes it collapses itself and sends itself the server which sends it to all clients that need the update and they rebuild the model thus updating the state.

The model state is stored in mongo on the server, not as a backbone instance. The server uses/edits the data in this state.

Could Capsule be used only client-side for the collapsing and rebuilding of backbone models on the client? This is where I'm running into some trouble right now.

I'm using backbone-relational to automatically build nested objects but I found that if I pass in identical attributes the nested models are re-added and updated during the rebuilding process even though nothing has changed.

Since my model sync method is tied to any change of the model this results in a never ending update cycle.

I was going to just try out Capsule but I still need backbone-relational for other reasons and as far as I know capsule would have to replace it on the client... So I thought I would post here first and get your feedback.

Thanks for your effort pushing applications in this direction and doing things differently(better)