Building a Semantic Web Application in Java
Since you have decided that you also want to make sure it can fulfill all the usual use-cases – performance, concurrent updating, ease of maintenance, basic functional capability (for a business app perhaps), and importantly, whats the benefit – how do you sell this to your manager. For you it’s cool, its being talked about in all the hard to reach places that only you know, and it has more and more promise the more you look into it. You want to do it, but if it doesn’t cut-the-mustard, whats the point – wait a while, let someone else solve the problems, then come back to it. You can still work in the web app world, doing what youve done for the last while, make some money, pay the bills. So, before you even start, the Semantic Web is up against it – it has a lot to prove against a long embedded technology where experience has already paid and dividends been reaped. It better be good……
First question – where to start ? Its a hard question to answer if you’re not familiar with the Semantic Web, and even if you are – if you can grasp the basic and simple ideas behind it – then you’re still going to have difficulty. And whats the Linked Open Data web ? How do I use it, why should I bother ? Why would my boss be interested ? How can I make them interested ? How can they make money from it ? Doesn’t his mean my companies data is going to be available to the public, and my competitors ?
So, over the next while, Im going to try and relate how and why I did what I did to build two different kinds of web application –
1) a read-only reference data application that makes use content loaded into a repository and fronted with a sparql end point, talks to geonames, dbpedia, sindice, uberblic and google maps.
2) a “White Label” J2EE Location Based Service that uses JPA behind its DAOs to talk to a semantic repository. It also makes use of OpenID to provide some anonymity, Spring Security to provide security and ACL controlled authorization (all stored in a semantic repository) and integrates the first app using JSONP (Facebook Authentication and OAuth authorization are also on the cards).
It has taken a while, and there have been some good and bad choices, so tune in next time for the first installment in the series, selected from this bunch :
- Target Functionality – what is my application and what parts of the semantic web do I want and/or need to deliver. Does the application want/need to be part of the Linked Open Data web ?
- Selection criteria – technologies, content, delivery
- Available tools and technologies. Can I avoid SOA pitfalls or is this just the same old story ?
- What needs writing ?
- How to architect ?
- Do I need an ontology – how to create ? Whats OWL-DL/Lite/RDFS/DAML/XYZ ?
- Text vs RDF vs XML – Reading, generating, parsing, APIs.
- Size, performance, scale
- Output – files, databse, rdf, URIs, linkage, API ?
- Do I need freetext search ? How do I do it ? Why not just use SOLR and faceted search ?
- Content Negotiation – who/what is my audience ? browser, script, machine, API ?
- Mapping – I’ve got location, lets use it – show it and link it
- Ajax, js – can I use semantic web/rdf/rdfa libs in my UI – do I have to do it all ? What help is there ?
- UI – can I build a UI to display and collect queries (forms) using my ontology ? How do I allow a human to easily navigate thru my strutured, but infinitely (hey, what about closure ?) graphable set of nodes ?.
Which do you want to hear about first ?
Like I said, I built two web applications for the Semantic and Linked Open Data web. The articles following this introduction will talk about both in parallel.