d.construct, The Joy of API

A presentation by Jeremy Keith of Clear:Left.

Jeremy was very enthusiastic about the fun he’s had meddling with APIs. He started off by explaining little about REST. I thought, “oh, no, something else I don’t know about” but it turns out that REST is pretty much what the “normal” web is all about:

REpresentational State Transfer

  • The application state and functionality is devided into resources
  • Every resource is uniquely addressable. With HTTP, this is done via a URL.
  • It’s a stateless client/server protocol: in HTTP, each message contains all the information necessary to understand the request when combined with the state at the resource.

Huh? Well, that more or less describes bog-standard web stuff: links, images, pages etc.

Then there’s SOAP, Simple Object Access Protocol

Jeremy compared the APIs for four major sites which he has experimented with, and rated them for power, documentation (help) and his measure, “joy” of use. The results were as follows:

  • Flickr: power=9; docs=8; “joy”=9
  • Amazon: power=8; docs=8; “joy”=8
  • Delicious: power=6; docs=6; “joy”=6
  • Upcoming: power=6; docs=6; “joy”=6

Maps often seem to be the most popular API for experiementation. Mashing mapping with other data feeds gives excellent geo-tagged information. What happens if you drop a 100KT bomb on the Corn Exchange, Brighton? Enquiring minds want to know…

[Mashed - that's what most of Brighton would be if you dropped a 100KT bomb on the Corn Exchange]

The oft-cited Chicagocrime.org site, a prime example of mapping + other stats, was actually written before the GoogleMaps API was released! Sounds like hard work. Other geo-tagged fun sites included:

Overheard in New York + Google Maps = Overplot

[take care on 52nd and Lexington - watch out for the cannibal vegan!]

Gawker + Google Maps = GawkerStalker

[where are all the celebs to be found in NY?]

And finally, the most important point is that your mashups are only ever as good as your data. What happens if you look up Brighton with Yahoo maps instead of Google…

[oops! what happened to Brighton?]

Jeremy pointed us to some useful resources for getting started with APIs:

  • Programmable web tells you what’s out there to be mashed
  • dapper lets you create a service from any website – DIY API?
  • microformats and all that they can achieve for you
  • mapstraction provides a common API for Google, Yahoo and Microsoft mapping

References from Jeremy’s slides are available on his website.

This entry was posted in conferences, dConstruct, development and tagged , , , . Bookmark the permalink.

Comments are closed.