... |
| * [An introduction to the mongo node.js driver|https://www.10gen.com/presentation/mongohamburg-2011/an-introduction-nodejs-mongodb-driver] - June 2011 * [Using MongoDB with node.js|https://www.10gen.com/presentation/mongodc-2011/using-mongodb-with-nodejs] - June 2011 |
| * [Node.js & MongoDB|http://www.10gen.com/webinars/nodejs] MongoDB|http://www.10gen.com/presentations/webinar/node.js-and-mongodb-a-panel-discussion] - Webinar June 2011 |
| * [A beautiful marriage: MongoDB and node.js|http://www.10gen.com/presentation/mongonyc-2011/mongodb-and-nodejs] - MongoNYC June 2011 * [Rapid Realtime App Development with Node.JS & MongoDB|http://www.10gen.com/presentation/mongosf2011/nodejs] - MongoSF May 2011 |
... |
Node.js is used to write event-driven, scalable network programs in server-side JavaScript. It is similar in purpose to Twisted, EventMachine, etc. It runs on Google's V8.
This is an overview of the available tools and suggested practices for using Node.js with MongoDB. Those wishing to skip to more detailed discussion should check out the The Node.js Driver Manual.
The MongoDB Node.js driver is the 10gen-supported driver for MongoDB. In spring 2012 10gen officially adopted the popular Node MongoDB Native Project and sponsored the maintainer, Christian Kvalheim, to continue its development. It's written in pure javascript and provides a native asyncronous node.js interface to MongoDB. The driver is optimized for simplicity. It can be used on its own, but it also serves as the basis of several object mapping libraries, such as Mongoose.
The easiest way to install is to use npm:
$ npm install mongodb
Because MongoDB is so easy to use, the basic Node.js driver can be the best solution for many applications. However, if you need validations, associations, and other high-level data modeling functions then an Object Document Mapper may be helpful.
Mongoose is the 10gen-supported ODM for Node.js. It has a thriving open source community and includes advanced schema-based features such as async validation, casting, object life-cycle management, pseudo-joins, and rich query builder support.
Install it easily with npm:
$ npm install mongoose
Each of these projects build on top of the native Node.js driver and so some knowledge of that is useful, especially if you work with a custom Mongo configuration.
Mongoskin tutorial
Mongoose Tutorial
A few 3rd party drivers exist. While not officially supported by 10gen, these drivers take a different approach that may be valuable given your needs.