« Internal Mash Up | Main | Mash Up My Flex »
The Joy of API
d.Construct 2006, Brighton, UK
12 noon - Jeremy Keith - The Joy of API
Joy of technology
Fun to play around
I didn't get the web until I came across Fray.com. It was an emotional reaction. Stories drove the design.
Fray made me learn HTML. I was in a band in Germany and we wanted a website. 1998.
Warning: Code Ahead
How do you start to use these APIs
Your start with a url, an api key, point to an xsl file, put parameters onto the url using a simple php function.
Amazon sends back an xml data file, which I send back through with xsl file which gives relevant markup for the website.
REST : Representational State Transfer
It is an idea how to build these ideas together.
Application state and functionality is divided into resources.
Every resource is uniquely addresssable. In HTTP, this is done with a URI.
SOAP (photo snakes on plane - laughter) : alternative to REST. You have to create an xml file and then an xml is sent back. Not joyful.
I did get joy when I started using Flickr. I was reluctant at first, as I had photos on my site, and didn't want to use a third party services. Then I started using del.icio.us, flickr, amazon, upcoming. My data is scattered all over the web.
I wanted to draw them all together on my site. APIs.
I get a url, I use php 5's DOM methods.
It grew and grew, and I started Adactio Elsewhere. It creates a trail of my pictures, my contact's pictures, fun.
Let's rate the APIs. I am going to rate them by power, documentation, and joy.
Flickr Amazon Delicious Upcoming
power 9 8 6 6
docs 8 8 6 6
joy 9 8 6 6
That is just four services. There are hundreds if not thousands of APIs out there.
This cornucopia provides a web of data: Identity, Events, Relationships, Location
Dealing with maps is fun. I had so much fun browsing the world with Google maps. Absolute favorite Google map mashup: Overplot.
Parallel to the web of data:
The Live Web:
The RSS is the best way to keep track of it.
And Tagging.
Technorati uses RSS and Tagging to keep track of the live web.
Who is linking to this site? Who is using the same tags?
There is a problem with these APIs. You do need to know your stuff. You have to know XML and parsing XSLT. You need to know javascript and server-side (php, asp, java, ruby, python, or perl). It is for Alpha Geek.
Ning is freeing APIs up for everyone, not just geeks.
Dapper is also similar. A clever form of screen scraping.
Microformats:
Identity hCard
Events hCalendar
Relationships XFN
Location geo
A way to turn the web into a giant API.
Microformats has rekindled my joy of HTML.
http://adactio.com/extras/joyofapi
Question: you say it is a shame that only alpha geeks can use APIs, but why would anyone but a geek want to use an API?
Answer: There is no reason why people with a website or blog can use an API. The spirit of the original web.
Question: What happens when this all goes away? (talks lots about all this details of libraries)
Answer: It would be good if there were meta-libraries that connect the data.
Question: you have mentioned that there has been flakiness, surely if there are more calls to different servers, are there ways around making it more stable?
Answer: you can switch to other providers if Google maps is flaky today then use Yahoo. We use third party for mission critical things all the time, like email.
Question: I am the editor of bitcultural magazine, we have been using RSS for four years. We are using APIs for musuems and cultural data all over britian. How long do we have before the next trend happens given that it takes so long to develop?
Answer: RSS is an API. If you can provide a RSS for everything on your site... You can use microformats if you don't have the budget or time to doing a larger API. RSS, Atom, and microformats are a RESTful way to do it.


Leave a comment