After using MongoDB extensively on my last major project, I thought it would be a shame to go back to SQL Server and forget all the benefits of NoSQL, NoSchema and 'the document store' that MongoDB is. To this end, I thought it was time to build a project I've been thinking (and talking!) about for a while now - my running database!
After playing soccer for the best part of 25 years, my body was sore and battered. I'd fractured both ankles in my teens and early twenties and these injuries were playing up. As such, I had to press pause on my soccer career at the age of 29. I spent the next two years working, eating, drinking and leading a rather sedentary lifestyle until an incident in early 2006, where I had to run (read: quick walk!) 150 meters to catch a tram. I did manage to catch the tram but as I stood there, holding myself up by the leather strap, gasping for breath and feeling like my heart was going to burst through my chest Aliens style, I realised that I, a state athletics team member, a soccer player for 23 years and an all-round fit guy was out of shape.... badly out of shape, and things had to change! This lead me to discover running!
Since then I've been a passionate runner and have run in several places around Australia and the world... read more on my running adventures.
The aim of the project was two-fold:
- to build a small web-app that would allow me to catagloue various runs I've done around the world, view & edit their details and search them via a graphical UI
- to solidify my understanding of MongoDB
As part of building the project, I thought I'd share my process and some of the things I learnt on the way! To this end, I thought I'd structure this post as a series, covering the following:
- Introduction to project (that's this post!)
- Project specifications and structure
- NoSQL -> MongoDB: What is it? Why use it?
- Installation of MongoDB
- Using MongoDB: the console & other tools
- Benefits, drawbacks and going forward
Why use MongoDB?
not just using the latest technologies because they're kewl!
Normally I'm a big advocate for using the most appropriate technology to solve business problems and not just using the latests technologies because they're kewl! It's wise to balance this objective with the needs of the business, including: existing skillset with the organisation, existing tech-stack, maintainability now and moving forward, reusability of codebase and architecture to name a few. This said I did think MongoDB was kewl and I was keen to solidify my understanding of this new technology, so given this was a small personal project, I though I would ignore these tried and true architectural guidelines! To be honest, it wouldn't really have mattered what mechanism I used to persist data for this project... comma separated values in a text file would have done the trick!!!
The next post will be Project specifications and structure - due out soon.