Ruby

Constructing Web APIs with Rack, Sinatra and mongoDB

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!

[slideshare id=7912053&doc=ruby-ireland-may-11-110510111623-phpapp02&w=400&h=334]

Enforce Web API version compatibility with Sinatra filters

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

Ruby Ireland Talk 10 May 11

On May 10, I’ll be giving a talk on Constructing Web APIs with Rack, Sinatra and MongoDB at the monthly Ruby Ireland presentation gig. It will take place at Seagrass in Portobello, Dublin. Kickoff is at 7pm.

Full details, with maps, links and a rash promise of free food from Kevin Noonan, can be found in this posting to the Ruby Ireland group. You will need to sign up for the nosebag.

I aspire to having the talk slides up on Slideshare beforehand - this topic may be old hat to some of you hard-core Ruby types, but it’s relatively new and interesting to me, and may be so to others. In any case we’ll be looking at some new stuff, in the case of MongoDB and having some fun with it.

Bí ann nó bí chearnóg, mar a deirtear.

Hope to see you there.

Xcake - Web Services with Sinatra and Heroku

On Feb 8, I gave a talk at the local Xcake monthly meetup at the Science Gallery in Dublin. These meetings are predominantly loaded with mobile developers, with a worthy smattering of other creative professionals. The talk was on Web services, and how easy it can be to lash something together to test your mobile application development. Many of the mobile dev shops interact with client data through a web service, and making your own local copy with test data can give you a speed advantage in getting your (client's) app to market. The talk uses Ruby, Sinatra and Heroku as the core tech behind a RESTafarian style of service, with persistence and a public deployment.

The good news is that neither the bucket of tar nor the sack of feathers was required by the audience, there was a distinct lack of torches/pitchforks, et cetera. As a result I've posted the slides on Slideshare. They are mostly composed of screengrabs and codedumps, so make sure you view the presenter notes, in which I have expanded on the sparsely populated slides themselves. You can get the sample code on GitHub. I'll buy beers for anyone who implements simple database authentication and sends me a successful pull request :)

Note: I've spotted some rendering weirdness with Chrome - if you can't see the slides, try another browser, or hit the download button.