title: share backbone code on client and server side with mongodb storage
body: <p>I'm looking for a solution to code only once the models for a backbone, mongodb, nodejs based app.</p>
  
  <p>The storage can be only server side, but I still need proper model definitions both on the server and the client. On the server side I've decided to go with mongodb.</p>
  
  <p>After all the only thing I've found is <a href="https://github.com/donedotcom/backbone-mongodb" rel="nofollow">https://github.com/donedotcom/backbone-mongodb</a>.</p>
  
  <p>I think I've understood backbone quite well, but have never use mongodb before, and I can't figure out how to really use backbone-mongodb. Could someone tell me how it complements backbone, what Document and EmbeddedDocument are meant for and how they related to Backbone.Model? Does this have anything to do with code sharing b/w client and server? </p>
  
  <p>Of course, my idea would be to share the model definitions and validation (done mostly with backbone-validation) b/w the server and the client.</p>
  
  <p>thanks, Viktor</p>