DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
Building Scalable Real-Time Apps with AstraDB and Vaadin
Register Now

Trending

  • 5 Key Concepts for MQTT Broker in Sparkplug Specification
  • Chaining API Requests With API Gateway
  • Writing a Vector Database in a Week in Rust
  • What Is React? A Complete Guide

Trending

  • 5 Key Concepts for MQTT Broker in Sparkplug Specification
  • Chaining API Requests With API Gateway
  • Writing a Vector Database in a Week in Rust
  • What Is React? A Complete Guide
  1. DZone
  2. Data Engineering
  3. Databases
  4. Building Your First MongoDB App in Ruby: An OSCON 2012 Tutorial

Building Your First MongoDB App in Ruby: An OSCON 2012 Tutorial

Steve Francia user avatar by
Steve Francia
·
Jul. 30, 12 · Interview
Like (0)
Save
Tweet
Share
13.91K Views

Join the DZone community and get the full member experience.

Join For Free

This is a 3 hour tutorial I wrote for and gave at OSCON 2012.

Here is the summary:

This tutorial will introduce the features of MongoDB by building a simple location-based application using MongoDB. The tutorial will cover the basics of MongoDB’s document model, query language, map-reduce framework and deployment architecture.

The tutorial will be divided into 5 sections:

  • Data modeling with MongoDB: documents, collections and databases
  • Querying your data: simple queries, geospatial queries, and text-searching
  • Writes and updates: using MongoDB’s atomic update modifiers
  • Trending and analytics: Using mapreduce and MongoDB’s aggregation framework
  • Deploying the sample application

Besides the knowledge to start building their own applications with MongoDB, attendees will finish the session with a working application they use to check into locations around Portland from any HTML5 enabled phone!

TUTORIAL PREREQUISITES
Each attendee should have a running version of MongoDB. Preferably the latest unstable release 2.1.x, but any install after 2.0 should be fine. You can dowload MongoDB at http://www.mongodb.org/downloads.

Instructions for installing MongoDB are at http://docs.mongodb.org/manual/installation/.

Additionally we will be building an app in Ruby. Ruby 1.9.3+ is required for this. The current latest version of ruby is 1.9.3-p194.

  • For windows download the http://rubyinstaller.org/
  • For OSX download http://unfiniti.com/software/mac/jewelrybox/
  • For linux most users should know how to for their own distributions.

We will be using the following GEMs and they MUST BE installed ahead of time so you can be ahead of the game and safe in the event that the Internet isn’t accommodating.

  • bson (1.6.4)
  • bson_ext (1.6.4)
  • haml (3.1.4)
  • mongo (1.6.4)
  • rack (1.4.1)
  • rack-protection (1.2.0)
  • rack shotgun (0.9)
  • sinatra (1.3.2)
  • tilt (1.3.3)

Prior ruby experience isn’t required for this. We will NOT be using rails for this app.

OSCON 2012 MongoDB Tutorial from Steve Francia

 

MongoDB app

Published at DZone with permission of Steve Francia, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Trending

  • 5 Key Concepts for MQTT Broker in Sparkplug Specification
  • Chaining API Requests With API Gateway
  • Writing a Vector Database in a Week in Rust
  • What Is React? A Complete Guide

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com

Let's be friends: