Web Application – Part 1

Background

The next stage will look at developing a, user friendly Web Application using our MongoDB database. Here we look at various options and tools/frameworks for developing our application.

In this project we will explore using Node.js to build our website.

Node.js is a platform built on Chrome’s JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.

You can use the native Node.js driver (node-mongodb-native) provided with mongoDB

http://mongodb.github.io/node-mongodb-native/

https://github.com/christkv/node-mongodb-native/

or one of a number of wrappers (interfaces) which are designed to simplify the interface between MongoDB and Node.js

MongooseJS is an object modeling library. It sits on top of the MongoDB driver and manages relationships and object mapping. It can detect changed properties in objects, and then run validation and update operations.

http://mongoosejs.com/

Mongojs is a node.js module for mongodb, that emulates the official mongodb API as much as possible and is a wrapper for mongodb-native

http://github.com/gett/mongojs

http://mongojs.org/

http://howtonode.org/node-js-and-mongodb-getting-started-with-mongojs

Mongode is a very thin (~200 lines of code) wrapper around the node-mongodb-native driver. It buffers collection operations until a connection is made, thus removing one level of callback nesting. It also binds collections to the database object as a key on the object making code easier to read.

https://github.com/milewise/mongode

Another framework useful when developing with node.JS is expressjs – which organizes your web app into an MVC architecture on the server side. (Model–view–controller (MVC) is a software architecture pattern which separates the representation of information from the user’s interaction with it)

Express is a minimal and flexible node.js web application framework, providing a robust set of features for building single and multi-page, and hybrid web applications.

http://expressjs.com/

Useful Links

http://howtonode.org/node-js-and-mongodb-getting-started-with-mongojs

http://mongoosejs.com/

http://mongojs.org/

http://nodejs.org/api/net.html

http://nodejs.org/

http://mongodb.github.io/node-mongodb-native/index.html

https://github.com/milewise/mongode

http://www.nodebeginner.org/#javascript-and-nodejs

http://stackoverflow.com/questions/2353818/how-do-i-get-started-with-node-js

http://net.tutsplus.com/tutorials/javascript-ajax/node-js-for-beginners/

Application

http://blog.ijasoneverett.com/2013/03/a-sample-app-with-node-js-express-and-mongodb-part-1/

http://jade-lang.com/