Alternative Data Views
It is important to make sure that a repository is accessible to machines as well as humans as this allows it to be indexed more efficiently and thus more discoverable on the web. RedFeather currently supports 3 alternative data formats: JSON, RSS and RDF. Additional representations, including schema.org markup, were considered during development but taken out of scope for this initial version of RedFeather. They do, however, make ideal candidates for further work.
Out of the formats mentioned, JSON is both the simplest and most versatile since it is easily understood by both humans and machines. Unfortunately, JSON support was only introduced in PHP v5 so it cannot be including in the core and so is only available as a plugin.
RSS is intended more for digesting the repository as a whole, and as a result is only accessible as a feed from the index page. Since there tends to be a lot of variance in terms of what different stream readers expect from RSS we decided to stick with a minimal entry format to try and maximise compatibility. However, the only truly critical important API is Nottingham Xpert, since that is one of the only feasible ways to make a small source of OER, such as an independent RedFeather installation, visible to the wider community.
Due to the inherent complexity of the format, the creation of an RDF export for RedFeather presented a few interesting challenges, most of which involved the ‘creators’ field. The first problem was that of URIs. Since RedFeather is implemented as a single php file, it’s not exactly overflowing with accessible URLs that can be used to resolve a URI. This is compounded by the fact that RedFeather doesn’t really have any concept of “people” as an entity – there are no profile pages for individuals and the user account system is ONLY used for authentication. In effect, a creator is just a single name field with an optional email address associated with it. Further problems occur if a certain name appears on multiple items in the repository – how do you tell if they are the same person or multiple entities? What if they are the same person but have changed their name or email? What happens if you delete all the resources by a certain author and re-add them? Will they still have the same URI?
Trying to solve all these issues and implement a complicated system which can deal with all the fringe cases above is ludicrous when you consider the elegant simplicity of the rest of RedFeather. A better solution would be to just assume that two creators with the same name and email are the same person. This will work in the vast majority of cases except in unusual instances where no email is known and their name is something incredibly common, like Bob. We can therefore pretty much just concatenate the name and email together to form the URI – however, the URI still needs to resolve to a page that makes contextual sense for a person. To solve this we just included a special page which contains a list of all the creators who have contributed to the repository. The names on this list are then linked to using an anchor tag to give a final URI that looks something like www.example.com/index.php?page=creators#matt
Leave a Reply