Geeks With Blogs
Liam McLennan

This weekend I have been in Sydney at the MS Web Camp, learning about web application development. At the end of the first day we came up with application ideas and pitched them. My idea was to build a web management application for mongoDB.


I pitched my idea, put down the microphone, and then someone asked, “what’s mongo?”. Good question. MongoDB is a document database that stores JSON style documents. This is a JSON document for a tweet from twitter:

        "_id" : ObjectId("4bfe4946cfbfb01420000001"),
        "created_at" : "Thu, 27 May 2010 10:25:46 +0000",
        "profile_image_url" : "",
        "from_user" : "drearyclocks",
        "text" : "Does anyone know who has better coverage, Optus or Vodafone? Telstra is still too expensive.",
        "to_user_id" : null,
        "metadata" : {
                "result_type" : "recent"
        "id" : {
                "floatApprox" : 14825648892
        "geo" : null,
        "from_user_id" : 6825770,
        "search_term" : "telstra",
        "iso_language_code" : "en",
        "source" : "<a href="" rel="nofollow">TweetDeck</a>"

A mongodb server can have many databases, each database has many collections (instead of tables) and a collection has many documents (instead of rows).


Day 2 of the Sydney MS Web Camp was allocated to building our applications. First thing in the morning I identified the stories that I wanted to implement:

Scenario: View databases
Scenario: View Collections in a database
Scenario: View Documents in a Collection
Scenario: Delete a Collection
Scenario: Delete a Database
Scenario: Delete Documents

Over the course of the day the team (3.5 developers) implemented all of the planned stories (except ‘delete a database’) and also implemented the following:

Scenario: Create Database
Scenario: Create Collection

Lessons Learned

I’m new to MongoDB and in the past I have only accessed it from Ruby (for my hare-brained scheme). When it came to implementing our MongoDB management studio we discovered that their is no official MongoDB driver for .NET. We chose to use NoRM, honestly just because it was the only one I had heard of. NoRM was a challenge. I think it is a fine library but it is focused on mapping strongly typed objects to MongoDB. For our application we had no prior knowledge of the types that would be in the MongoDB database so NoRM was probably a poor choice.

Here are some screens (click to enlarge):

image image

Posted on Saturday, May 29, 2010 2:53 AM | Back to top

Copyright © Liam McLennan | Powered by: