Integration of Node.js and Backbone.js

前端 未结 7 808
醉梦人生
醉梦人生 2021-01-29 22:57

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 ide

相关标签:
7条回答
  • 2021-01-29 23:36

    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.

    0 讨论(0)
  • 2021-01-29 23:44

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

    0 讨论(0)
  • 2021-01-29 23:45

    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.

    0 讨论(0)
  • 2021-01-29 23:48

    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

    0 讨论(0)
  • 2021-01-29 23:49

    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

    0 讨论(0)
  • 2021-01-29 23:53

    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

    0 讨论(0)
提交回复
热议问题