Main

October 14, 2008

Yer Basic One-Liner

one-line-alert-small0.jpg
Here's your basic one-line handle client (all of it) for the browser:

OpenHandle.Util().getHandleData("10.1038/nature05826", function(data) { alert(OpenHandle.Util().helloWorld(data)); });

Can't see how to make that much shorter (bar tossing spaces). But here's one attempt (shorter though now it's not strictly a one-liner):

var u = OpenHandle.Util();
u.getHandleData("10.1038/nature05826", function(_) { alert(u.helloWorld(_)); });

(Continues below)

Continue reading "Yer Basic One-Liner" »

October 8, 2008

OpenHandle JavaScript API

openhandle-api-small.png (Click figure for PDF.)

I just posted updated versions of the OpenHandle JavaScript Client Library (v0.2.2) and Utilities (v0.2.2) to the project site. Mainly this post is just by way of saying that there's now a "cheat sheet" for the API (see figure above, click for PDF) which will give some idea of scope. The JavaScript API attempts to reflect the Java Client Library API for Handle data structures, and has in excess of 100 methods. A change log is available.

The new API supports:

  • Single namespace
  • Introspection
  • Unit testing, see here

Why is this of interest to CrossRef? Well, if DOIs are ever to begin take advantage of their innate Multiple Resolution capabiities there needs to be nimbler means of accessing the data items stored with a DOI. A JavaScript API would allow the data to be manipulated in the browser down by the user and so enable bespoke services. That, at least, is the idea.

October 1, 2008

The Last Mile

last-mile.png

The figure above (click to enlarge) is probably self-explanatory but a few words may be in order.

With no end-to-end delivery of data from the Handle System to the user's application (broswer or reader), getting data out of the Handle System has traditionally meant using the Web (ie. HTTP) as a courier - in effect, this is the "last mile" for Handle data. Typically an upstream (Handle) client provides services to the user. The most well known of these services is the URL redirect service which underpins the CrossRef reference linking service. Another hosted service is the web form which displays data stored in the Handle records in a simple HTML table for user browsing. See panel a) in the figure above.

By contrast, the OpenHandle proposal aims to move data in the Handle record in structured form (JSON or XML) over the Web for downstream processing - either in the user's browser or on the desktop. See panel b). Advantages are that the Handle data and data structures are moved closer to the user and the services provided are capable of being better targeted and made more relevant. Data mobility as a whole is much improved. The data are accessible using standard Web description and scripting languages. One might almost say (to paraphrase the well-known Java slogan "write once, run anywhere") that this is a case of "read once, write anywhere".

Handle Clients #1, #2, #3

clients-123.png

Three alternate clients for viewing a Handle (or DOI): #1 (sky - text), #2 (black - tuples), #3 (white - cards) - the image above is "clickable". When Handle clients become JavaScript-able, one really can have it one's own way. (The JavaScript library is here, the demo service interface here - the code for setting up a new service interface can be got from the OpenHandle project.)

September 22, 2008

Look Ma, No Plugins!

var f = function (OpenHandleJson) {
  var h = new OpenHandle(OpenHandleJson);
  var hv = h.getHandleValues();
  for (var i = 0; i < hv.length; i++) {
    var v = new HandleValue(hv[i]);
    if (v.hasType('URL')) {
      print(v.getData());
    }
    else if (v.hasType('HS_ADMIN')) {
      var a = new AdminRecord(v.getData());
      print(a.getAdminPermissionString())
    }
  }
}

"And that, gentlemen, is how we do that." - Apollo 13

Following on from my earlier Client Handle Demo post, this entry is just to mention the availability of a port of (part of) the Handle client library (in Java) to JavaScript: openhandle-0.1.1.js which is being maintained on the OpenHandle site. The JavaScript module contains methods for three classes: OpenHandle, HandleValue and AdminRecord.

What does all that mean? It means that Handles and their constituent values and value fields can be accessed directly within any Web browser (using an OpenHandle service) which allows a dynamic Handle client to be generated and presented within a user context. No plugins required. The port mirrors the class methods in the standard Java client library for Handle.

As a demo of this JavaScript module in action, see this Inspector app for a card index view of Handle (and by implication DOI) records.

July 1, 2008

Client Handle Demo

This test form shows handle value data being processed by JavaScript in the browser using an OpenHandle service. This is different from the handle proxy server which processes the handle data on the server - the data here is processed by the client.

Enter a handle and the standard OpenHandle "Hello World" document is printed. Other processing could equally be applied to the handle values. (Note that the form may not work in web-based feed readers.)

:


May 29, 2008

Dark Side of the DOI

openhandle_p5_radial.jpg

(Click to enlarge.)

For infotainment only (and because it's a pretty printing). Glimpse into the dark world of DOI. Here, the handle contents for doi:10.1038/nature06930 exposed as a standard OpenHandle 'Hello World' document. Browser image courtesy of Processing.js and Firefox 3 RC1.

April 21, 2008

OpenHandle: Languages Support

Following up the earlier post on OpenHandle, there are now a number of language examples which have been contributed to the project. The diagram below shows the OpenHandle service in schematic with various languages support. Briefly, OpenHandle aims to provide a web services interface to the Handle System to simplify access to the data stored for a given Handle.

(Note that the diagram is an HTML imagemap and all elements are "clickable".)
openhandle_schematic.jpg

March 7, 2008

OpenHandle: Google Code Project

Just announced on the handle-info and semantic-web mailing lists is the OpenHandle project on Google Code. This may be of some interest to the DOI community as it allows the handle record underpinning the DOI to be exposed in various common text-based serializations to make the data stored within the records more accessible to Web applications. Initial serializations include RDF/XML, RDF/N3, and JSON.

We'd be very interested in receiving feedback on this project - either on this blog or over on the project wiki.