Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

share backbone code on client and server side with mongodb storage

I'm looking for a solution to code only once the models for a backbone, mongodb, nodejs based app.

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.

After all the only thing I've found is https://github.com/donedotcom/backbone-mongodb.

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?

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.

thanks, Viktor

like image 814
Akasha Avatar asked May 19 '26 05:05

Akasha


1 Answers

I've just finished rewriting backbone-mongodb

there is an example todo application (stay with commit eb935ae7480c18c9d6fcf2f5a2187cdff3d17a13) available as well

like image 124
Akasha Avatar answered May 22 '26 12:05

Akasha



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!