Thursday, October 2, 2014

Numishare Migrated from Cocoon 2.1.11 to Orbeon

Over the past few weeks, I have been working on migrating Numishare's public user interface from Cocoon 2.1.11 to Orbeon. While Cocoon has been capable of delivering most of the functionality integral to Numishare, it is time to move on. Cocoon has been part of Numishare's application stack since before Numishare really even became a reusable framework; it dates back to the development of the University of Virginia Art Museum Numismatic Collection website back in 2007. Since this date, Cocoon has seen the release of 2.2 (dramatically different than 2.1.11), and has been stuck in a 3.0 alpha for more than three years. In fact, the most recent release of any version of Cocoon is 2.1.12. The application has served the cultural heritage community well for years, but let's admit it, Cocoon is dead. It has been dead for years, and I've been keeping Numishare going with duct tape and bubble gum for far too long. In fact, you have to change one of Cocoon 2.1.11's out-of-the-box settings to even support native UTF-8, resulting in garbled responses from Solr.

Although Cocoon has run its course, XML technology is still quite powerful, and has gotten a shot in the arm with the new XQuery/XPath 3.0 and XForms 2.0 specs, which will support JSON processing, among other new features. Orbeon's XML Pipeline Language (XPL) is quite robust, and Orbeon has been powering the user interface for all of my other projects for quite a few years (xEAC [see: http://numismatics.org/authorities/], EADitor [see: http://numismatics.org/archives/], the new [yet-to-be-released] Nomisma.org, and Kerameikos.org).

All of the functionality built in Cocoon's pipelines have been ported into Orbeon's XPL, which is now a better MVC framework. Furthermore, XPL and Orbeon processors enable a variety of modern HTTP features that are employed for the semantic web. All pages are HTML5, and record pages now include RDFa to embed Nomisma properties.

It is now much easier to deliver linked data in RDF/Turtle and JSON-LD. Numishare supports content negotiation to receive individual record metadata in NUDS/XML, RDF/XML, Turtle, JSON-LD (all three in Nomisma's model and ontology), and KML in the appropriate content-type; search results are available in Atom by requesting 'application/atom+xml' or raw Solr XML by requesting 'application/xml' in the Accept header. I have not included it yet, but the Pelagios linked data will also be made available in TTL and JSON-LD in addition to RDF/XML. The multilingual interface will be more dynamic, as we can make use of the browser language passed through the request header rather than relying on the 'lang' URL parameter. Finally, I have introduced an 'apis' page (linked from the navigation menu), which lists available APIs (just one now, to aggregate NUDS records into a single model) and relevant documentation. There are a number of features that have yet to be added, but Orbeon provides a path for implementation that Cocoon simply does not.

Most of the projects on our test server have already been migrated into the new version of Numishare. Once I have ported the stylistic themes from OCRE, AoD, CHRR, and Mantis, I will work on pushing the new Orbeon-based Numishare into production.