Oisín Hurley's Weblog

old dog, new tricks

Archive for May 2011

Constructing Web APIs with Rack, Sinatra and mongoDB

leave a comment »

Update: Ok, speaker notes have turned up at this point! Also, @matthutchin did a bang-up job of editing some moody video and sound of the talk into this video+slides presentation!
Update: Still no sign of the speaker notes on Slideshare  – here’s a bit of ruby to grab them from the slideshow and format them into an HTML page: https://gist.github.com/968161.

This the talk I gave at the Ruby Ireland meetup last night. I think it went over well – there’s plenty of interest in the plethora of non-SQL style databases, but the problem is over population of choice and the amount of time investment required before you can make a properly informed decision. I think the best approach is to try to find as many testimonials from companies that have incorporated these newer technologies into their data storage arsenal, and read them thoroughly. These will epitomise the (fleeting) state of the art.

In an ideal world, there would be a group of volunteers running a funded lab that can create independent assessments of all the different approaches and products.

The slideshow can be found on Slideshare; Code for the sample application can be found on GitHub. Code pull requests welcome!

Written by oisinhurley

May 11, 2011 at 10:40 am

Enforce Web API version compatibility with Sinatra filters

leave a comment »

Versioning in APIs is vital if you want to control the lifecycle, rather than it controlling you. If you are using Sinatra to do routing for your Web API, then you can easily stuff all the version compatibility testing into one place – a filter – and not have to propagate it through all your routes. Follow the gist to see the code.

https://gist.github.com/987247

Written by oisinhurley

May 3, 2011 at 12:13 am

Follow

Get every new post delivered to your Inbox.

Join 3,979 other followers