Macro-supported DSLs for schema bindings
We've recently started using the W3C's
banana-rdf
library
at MITH, and it's allowing us to make
a lot of our code for working with RDF graphs
both simpler and less tightly coupled to a specific RDF store. It's a
young library, but also very clever and well-designed, and it does an excellent job of
exploiting advanced features of the Scala language to make its
users' lives easier. Alexandre Bertails
and his collaborators deserve a lot of credit for what they've accomplished
in just a little over a year.
One of the least pleasant aspects of working with any RDF library is writing
bindings for particular vocabularies. For example, if we wanted to use the
Open Archives Initiative's
Object Reuse and Exchange vocabulary
in our banana-rdf
application, we'd need to write something like the following: