Friday, May 27, 2005

WADL: Describing RESTful Web Applications

Every so often, I tinker with developing little web apps, such as the OUseful book search, but never really document the API as well as I should.

So when I stumbled across Marc Hadley's Web Application Description Language Language (WADL), I saw an answer to some of my documentation problems.

The most recent thing I've been tinkering with is an RSS item webpage scroller, based on a tool I saw Brian Kelly from UKOLN use a few weeks ago, that scrolls through a list of websites (you'll need to enable pop-ups in your browser to use it). (I actually built a page that does something similar to Brian's tool quite some time ago that cycles through CRRN members' web pages, but it's not really reusable...)

The idea of the RSS feed scroller - which at the moment I have locked down to del.icio.us RSS feeds - is that you pass it a feed location stub and the scroller then cycles through the website items. So for example, here's what's popular on del.icio.us.

The service still uses a pop-up - when I get a chance I'll probably make it frame based - and is little more than proof of concept, but it's enough for the purpose of this post which if you remember is actually about WADL...

So - rather than use prose to describe how to call the service, how does this partial WADL fragment look?

<resources>
<resource uri="http://http://ouseful.open.ac.uk/magpierss/scroller.php">
<operation name="ScrollRSSlinks" method="get">
<request>
<parameter name="q" type="xsd:string" required="true" />
<parameter name="td" type="xsd:integer" />
<parameter name="num" type="xsd:integer" />
</request>
<response>
<representation mediaType="text/html" />
</response>
</operation>
</resource>
</resources>

Looking at this, a little bit of explamnation is required:
- q is the query that gets used in an expression of the form http://del.icio.us/$q - so it must point to an RSS feed (hmm - I could tweak that...)
- td is the time delay in seconds between showing each page. There is a separate (currently fixed) delay before starting the 'show' itself;
- num is the maximum number of pages to scroll through before going back to the start.

Del.icio.us tags:

Saturday, May 14, 2005

Extending Firefox into bbctags

In an earlier post, (Micro-info: Backstage, The BBC Opens Up a Little More) I posted a link to a Greasemonkey script that modifies BBC News pages so that story links to point to the bbctags site instead.

To use the script requires that you install Greasemonkey of course, which not everyone want to do... so when I found the Greasemokey compiler, that takes a Greasemonkey script and generates a fully blown Firefox extension from it, I thought I'd give it a go: download bbctags localiser extension, then File/Open it. (The direct installation won't work until I can persuade someone to add the correct application/x-xpinstall Mime Type to the server config.)

Once you have the extension installed, pop along to the BBC News website and check out a few stories...you should find when you click on a story link that you end up at the bbctags version of the site.

Friday, May 13, 2005

Teasing Google

A couple of amusing items about Google caught my eye the other day - this rather nifty spoof about a Google Content Blocker, and this newscast fromthe future about the rise of Googlezon.

And they sort of got me thinking about what other Google related trifles and amusing curiosities there might be out there... a stack of Greasemonkey aplications of course, but nothing that subversive...

...like a spoof on Google AdWords, such as Google AdBust...

So what I'm loking for is an RSS feed at words, or an image retrieving webservice at best, that allows me to subvert (in the comfort of my own borwser, of course) the ads Google tries to send me... you know the sorts of ad I mean, I think: something along the lines of the ads on AdBusters or the spoofs on funny-adverts.com...

Del.icio.us tags:

Backstage, The BBC Opens Up a Little More

BBC Backstage hit blogs yesterday with the announcement of their new developer network. The Backstage developer network announcement comes hot on the heels Creative Archive announcement last month, which I blogged about in the context of the eOpen University.

All(!) that's up for grabs at the moment are the Beeb's RSS feeds, and the content they contain, which can now be used to provide content to 3rd party sites. But what's promised is a BBC API in the BBC search engine, and an intriguiing sound postcode related tool.

Already there are several demo sites up giving a taste of what can be expected from a community that is now free to play with the BBC RSS feeds pretty much as it likes... Just like Amazon and Google, the Beeb perhaps realises that the future is closer if its co-invented by the users...

Anyway - one of my favourite early demos is the bbctags service, which allows you to tag news stories as in delicious, though the difference ihere is that tags only apply to BBC stories. Part of the release blurb states: "Users have their own tags page to aggregate bookmarked stories, and they can also view a global tags page showing the most popular and recent tags used by all users. There is also a tag search facility across a users' tags or the whole tag space." All pretty much as you'd expect, then...

The service is still quirky in places - e.g. I accidentally added the same tag to a page twice and the tag now appears twice as page mark up - but hopefully the site will be being maintained for at least a couple of iterations.

Having to share a login rather than having a personal login is also something of a constraint to usability in the current incarnation, but I guess this was acceptable enough for the site to be released as a proof of concept.

One thing that caught me out was that when I did a search from the bbctags page I got a results page from the BBC that just linked back to the main BBC site. That is, the returns from the search led directly to the story on the BBC site, rather than the tag enabled version on the bbctags site.

So.......for Firefox users with Greasemonkey installed, here's a first attempt at a script that converts BBC news feed URLs to bbctags URLs.

Now I can search the BBC news site for stories, and automatically have the story link redirected to the bbctags site...:-)

PS. to see what the BBC have to say about BBC Backstage themselves, check out this (taggable) report that proclaims Developers to play with BBC wares, or this (taggable) one describing how the BBC eases rules on news feed use.

Del.icio.us tags: