- From: Henry Story <henry.story@bblfish.net>
- Date: Wed, 10 May 2006 20:04:56 +0200
- To: Eyal Oren <eyal.oren@deri.org>
- Cc: Semantic Web <semantic-web@w3.org>, users@sommer.dev.java.net, Laforge Guillaume <glaforge@codehaus.org>
On 10 May 2006, at 13:31, Eyal Oren wrote: > On 05/10/06/05/06 00:02 +0200, Henry Story wrote: >> >> Hi, >> >> I just started an open source project called Sommer at https:// >> sommer.dev.java.net under a BSD licence. The code is just being >> forged right now, but feedback and ideas are welcome on the users >> mailing list. >> >> The idea is simply to use java annotations with simple Aspect >> Oriented Programing to map java object graphs to and from an RDF >> Graph. >> All a java programmer will need to do is annotate his classes and >> its fields like this: > > Great! > You might want to have a look at RDFReactor [3], Thanks :-) I blogged about it a year ago here: http://blogs.sun.com/roller/page/bblfish/20050825 RDFReactor creates fully fledged classes from an Ontology. It does not use annotations. This means that you end up with a lot of setter, getter, adder, getAll, etc type methods. It also ties you very much in to one framework. (though they have an abstraction layer for all the other frameworks - at the cost of efficiency presumably). My Sommer 0.2 does things like this but using dynamic proxies. In the end it is very tedious to have all these methods. And in the end, you never quite get all you want. And often you get too much. Sommer 0.4 adds java annotations, and for the moment starts by limiting itself to annotations on fields. (I will probably add annotations on methods too later, but I'd like to see how far one can get just with fields). It uses AOP to then do the mapping from the object to the RDF graph. This will end up being very flexible, allowing one to easily swap AOP tool set and RDF library without trouble. Sommer does not yet create a class of objects from an RDF ontology. That could easily be added as a separate tool though. I will very likely develop one when I feel that the mapping side of things is stable and well understood. > which is doing something like that for Java already, and at > ActiveRDF [2] which works for Ruby and is quite a bit more > comprehensive. I blogged about it here recently http://blogs.sun.com/roller/page/bblfish/20060427 Very nice. It would be fun to do something like this with Groovy too. > In [2] we discuss the difficulties mapping the Semantic Web RDF/DL > to the OO paradigm, and how a dynamic language such as Ruby helps > to do this. Thanks. I'll look this over in detail. Some comments after quickly glancing at that paper: I think one can get very far with Java. Using Dynamic Proxies by the way one can easily have multiple interface inheritance in Java. This is again what Sommer 0.2 does. It also suggests that annotations on methods (and hence on interfaces) could be useful too. Also using AOP tools like javassist, you can add methods to classes "dynamically". > I hope this will help getting you started, and to realise the > challenges ahead...(and by the way, there are several more > frameworks that try to do the same, as discussed in the paper). I think with Sommer 0.4, I am getting something that is both very flexible and easy to understand for Java programmers. It will be different from the other frameworks in being very minimalistic, which I hope will make it possible for multiple implementations to work with the same annotated code. I am trying with Sommer to get down to the core of the similarity between OO programming and RDF. Both are in fact just graphs. One is a graph of objects, the other a graph of resources. Looked at like that the similarity is quite a lot bigger than people have realised. All these tools are making it a lot easier for people to get the hang of RDF and understand the power that lies in its simplicity. I can forsee a time when RDF with SPARQL could become the default database access mechanism in Ruby on Rails... Thanks for the feedback. Henry > -eyal > > [1] http://activerdf.org > [2] http://eyaloren.org/pubs/sfsw2006.pdf > [3] http://rdfreactor.ontoware.org/
Received on Wednesday, 10 May 2006 18:05:08 UTC