Flex-able SPARQL

August 19th, 2008

One of the projects I’m working on is a Flex-based UI that connects to some web-services. These web services query an RDF store and return some really lame XML. The services are all built with Apache Axis, which is fine kit…but I hate web services. Hate Them. I’d rather slide down a rusty razor blade into a pool of alcohol than use them.

Yesterday I was productive enough to code up a SPARQL endpoint for my RDF store. Now, my SPARQL implementation is not complete and kinda naive, but it works. I’m lacking some of the less-used stuff like CONSTRUCT and UNION, but I’ve added some SPARUL stuff like INSERT DATA, DELETE DATA. In short, it’s enough for my purposes.

So since I’ve a got a more-or-less functional SPARQL, I decided I’d port my project to use SPARQL queries only and ditch the web services altogether. So long, WS-ohferfucksakes!

Did I mention I’m using Flex* for the front end? Right. So I needed to figure out if I could actually build a UI and that would send a query and get a result. After some tweaking of the endpoint (can’t seem to figure out how to override Accept: */* in mx:HTTPService), I got something up and running! It’s only able to parse application/sparql-results+xml right now. Tomorrow it’ll get to know application/rdf+xml so it can handle DESCRIBE without crapping all over itself.

Anyway, here’s some SPARQL-Flex porn showing a query against dbpedia

sparql-flex

* Yes, I know the Linked Data / Data Web folks HATE Flash/Flex (and javascript() apparently) since there are no URI’s to grab. But hey, just ’cause you want it doesn’t mean I have to give it to you. :P

One Response to “Flex-able SPARQL”

  1. Kingsley Idehen Says:

    URI exposure isn’t about “grabbing” it’s about holding true to the essence of the “Web” i.e., ensuring “Linkage” across Web accessible resources.

    All you have to do in you RIA application is track the resource URIs that you consume via a secondary resource. You then expose the secondary resource URI/URL via .

    Note: the resource could be RSS 1.0, RSS 2.0, Atom, OPML, or RDF.

    This simple action enables your effort to play well with the Web’s essence (again:resources Links and Linkage).

    Kingsley

Leave a Reply