I've been working my way through:
http://blog.andyet.com/2011/02/15/re-using-backbonejs-models-on-the-server-with-node
I have a few questions about sharing models server-side and a few questions about overriding sync. Real-time model syncing architecture ftw.
Models
So in this example he syncs his whole application state. Part of my application state is the User model, this handles things like logging in, finding the type of platform they are using, etc. Am I using this wrong? I have client side session data in this model, something that really doesn't need to be on the server, should I put this on the server anyway?For other models that are strictly application data that should be synced with the server, how do I manage these model on the server? Is there a "view" type component that handels changes to the model and acts on the model how the server needs to?
Sync
I want to override the sync method to sync with the server and any other clients that need the updated data. How could you write a sync method that works client -> server and server -> client so that no matter where it is called everyone get updated?