This is a depressing trend in the engineering world: the sealed machine with no discernable parts. I sometimes feel that, at the age of 35, I am a member of the last generation that grew up in a world of fixable objects.
via Popular Mechanics comes this tale of an iPhone failing because of a build-up of dust. It’s very true though that despite the increased awareness of the imperative to build a sustainable society we continue the trend towards throw-away and unfixable items. Apple is one of the worst offenders here. There’s even a macroeconomic effect since a disposable items cannot create a secondary market of repairs and spares. Companies like Apple are ring-fencing all the value in their products for themselves.
]]>I have through my “skill and judgement” interpreted where to locate the recycling centres, as they locations don’t appear on either the mapping or the original website.
So the locations are not derived…
Or are they? Some very interesting debate on the nature of derivative works based on maps and satellite images. Ed Parsons was formerly the CTO of the Ordnance Survey and is now at Google so you’d think he’d know, but it seems that the real answer is… it depends.
]]>Previously all the behaviour was specified by a configuration array with a dispatcher class. I found that was limiting the flexibility I needed and the “simple” configuration array was becoming decidedly complex. The Dispatcher class has been replaced by a new UriSpace class which is responsible for identifying the resources identified by a group of URIs. Applications can create classes derived from UriSpace to encapsulate the behaviour of their resources. Resources are split into three categories: documents that can be served straight up, abstract resources and descriptions of abstract resources. The last two are where the interesting bits of Paget lie. An application will typically override the get_description method to return a custom description derived from ResourceDescription. This class does all the hard work of finding triples about the requested abstract resource.
A class derived from ResourceDescription can override several methods to customise the RDF returned:
http://iandavis.com/id/me.rdf will have a resource of http://iandavis.com/id/me.The HTML output from Paget has been revised too. The basic layout of the page is handled by the SimpleHtmlRepresentation class but some type-specific logic has been broken out into a number of “widgets”. There’s one for OWL ontologies, RDF classes and properties and a general one that can render any RDF data. The html representation chooses an appropriate widget based in the type of the primary resource being rendered. I’m thinking about adding widgets for people and various other common classes. This is all very early and experimental. Ideally I would like the page to adapt itself completely dynamically based on the underlying data. Switching on the class of a resource is rather simplistic, but it will do as a starter.
Here’s an example of how I’m using Paget in my personal data space http://iandavis.com/id/me. All the data is held in a Talis Platform store. I handle requests to http://iandavis.com/id/ with some .htaccess rules that ensure every request is handled by a file called index.php which contains the code hooking the space up to Paget. In index.php I create a subclass of UriSpace called StoreBackedUriSpace that maps the URIs beneath http://iandavis.com/id/ to resources and their descriptions. That class creates instances of StoreBackedResourceDescription that use a StoreDescribeGenerators to fetch the descriptions from the platform store. The entire code for index.php (less PHP includes etc) is shown here:
class StoreBackedUriSpace extends PAGET_UriSpace {
function get_description($uri) {
return new StoreBackedResourceDescription($uri);
}
}
class StoreBackedResourceDescription extends PAGET_ResourceDescription {
function get_generators() {
return array( new PAGET_StoreDescribeGenerator("http://api.talis.com/stores/iand") );
}
}
$space = new StoreBackedUriSpace();
$space->dispatch();
That’s basically the pattern for publishing data using Paget: derive a class from UriSpace and override the get_description method to return a custom ResourceDescription. I do that to publish some vocabularies on vocab.org such as Bio and Whisky. The UriSpace for those locations returns a resource description class that uses the FileGenerator class to read the schemas from local RDF documents and the simple property labeller and the simple inferencer to augment the results. My other deployment, at placetime.com, uses a custom resource description for each type of resource with custom generators that create the raw triples based on the requested URI.
So far it seems that Paget is flexible enough to deal with these varied scenarios of data publishing. The next step is to start looking at editing of the data and providing more application functionality.
]]>So what’s to stop anyone from going to del.icio.us, changing the email address to my account and then getting access to change my password? WTF? Tell me what I’m missing here?
]]>