Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Integration of Node.js and Backbone.js

Tags:

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

like image 840
Will Piers Avatar asked Apr 12 '13 02:04

Will Piers


People also ask

Can you do backend with node js?

Node. js is sometimes misunderstood by developers as a backend framework that is exclusively used to construct servers. This is not the case; Node. js can be used on the frontend as well as the backend.

Do people still use Backbone JS?

Backbone. Backbone has been around for a long time, but it's still under steady and regular development. It's a good choice if you want a flexible JavaScript framework with a simple model for representing data and getting it into views.

Should I use backend or node JS?

js vs Python – which is better for the backend? Python is recommended for backend development. However, you could use Node. js both for backend as well as frontend development.

What is backbone JS comparable to?

Vue. js, React, AngularJS, Angular 2, and Ember. js are the most popular alternatives and competitors to Backbone. js.


1 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.

like image 137
Brad Harris Avatar answered Sep 27 '22 17:09

Brad Harris