You are previewing MongoDB in Action.

MongoDB in Action

Cover of MongoDB in Action by Kyle Banker Published by Manning Publications
O'Reilly logo

Chapter 3. Writing programs using MongoDB


In this chapter
  • Introducing the MongoDB API through Ruby
  • How the drivers work
  • The BSON format and the MongoDB network protocol
  • Building a complete sample application


It’s time to get practical. Though there’s much to learn from experimenting with the MongoDB shell, you can see the real value of this database only after you’ve built something with it. That means jumping into programming and taking a first look at the MongoDB drivers. As mentioned before, 10gen provides officially supported, Apache-licensed MongoDB drivers for all of the most popular programming languages. The driver examples in the book use Ruby, but the principles I’ll illustrate are universal and easily transferable to other ...

The best content for your career. Discover unlimited learning on demand for around $1/day.