Integration of Node.js and Backbone.js

I have done considerable reading on both Node.js and Backbone.js; I've read some tutorials and done the relevant courses on Code School. I feel that I've got a pretty good idea of the functions that each technology serves in the context of a web application.

My problem is that I don't really know how to integrate the two technologies and use them in tandem. I would really appreciate if someone could point me to a resource which goes through the entire development of an application using Node, MongoDB, and Backbone together.

Many thanks

Answers


This is a good tutorial that shows how to setup that entire stack.

http://backbonetutorials.com/nodejs-restify-mongodb-mongoose/

In short...

Node.js

You can use a library like restify to provide a restful API for your client-side Backbone application. It can also serve your static assets for your Backbone application. The example uses restify, but could be accomplished with other libraries like express.

Mongoose

Mongoose is a javascript abstraction layer for MongoDB. This provides an easy way to interact with MongoDB from Node.js.

Backbone

Your Backbone application can utilize your restify node.js backend to handle the model synchronization. You should have plenty of control to setup the routes via restify in a way that makes Backbone happy.


This ebook could be useful (it's on Backbone, but uses Node for the backend):

http://addyosmani.github.io/backbone-fundamentals/

You also may want to look at this book:

http://www.amazon.com/Building-Node-Applications-MongoDB-Backbone/dp/1449337392


There is also Node Cellar Source.

There is not much explanation about the code, but the app is simple enough to get started and understand the basics layouts of node / backbone

It is, i think, just between an 'Hello World' code and a full app.


I use for ap in backbone yeoman https://github.com/yeoman/generator-backbone and you use it with node.js too


create rest api: http://coenraets.org/blog/2012/10/creating-a-rest-api-using-node-js-express-and-mongodb/

code backbone on the client: http://coenraets.org/blog/2012/10/nodecellar-sample-application-with-backbone-js-twitter-bootstrap-node-js-express-and-mongodb/

the backbonetutorials.com restify one is out of date. It's best to use express, especially if you plan to do any authorization. It's also more widely used


This is a comprehensive tutorial on rolling your own blog with Nodejs, Mongodb and expressjs http://howtonode.org/express-mongodb It's old but with a little effort you can get it to work and learn at the same time


I have found this to be the most up to date material on using Backbone.js with node http://amzn.to/1DygKlJ


Need Your Help

file is being assigned a //# sourceMappingURL but already has one

javascript firefox meteor source-maps

I just notice Firefox console outputs the following error for every single .js/.coffee file in my project (even the packages).

Eclipse, adb, and ddms not detecting Android Emulator

android eclipse android-emulator adb ddms

I wanted to try my hand at programming android devices, so I followed the directions from the android website, installed the sdk, the java sdk, and eclipse. My computer is Windows 7 64-Bit, but I ...