Re: Java Framework for Content Negotiation

On 27 May 2010, at 10:47, Angelo Veltens wrote:
> What I am going to implement is this: http://www.w3.org/TR/cooluris/#r303uri
>
> I think, this is the way dbpedia works and it seems a good solution  
> for me.

It's the way DBpedia works, but it's by far the worst solution of the  
three presented in the document.

DBpedia has copied the approach from D2R Server. The person who came  
up with it and designed and implemented it for D2R Server is me. This  
was back in 2006, before the term Linked Data was even coined, so I  
didn't exactly have a lot of experience to rely on. With what I know  
today, I would never, ever again choose that approach. Use 303s if you  
must; but please do me a favour and add that generic document, and  
please do me a favour and name the different variants <foo.html> and  
<foo.rdf> rather than <page/foo> and <data/foo>.

The DBpedia guys are probably stuck with my stupid design forever  
because changing it now would break all sorts of links. But the thing  
that really kills me is how lots of newbies copy that design just  
because they saw it on DBpedia and therefore think that it must be good.

Richard



> My question is, if there is a java solution / framework for what is  
> shown in the picture in this section.
>
> I imagine something like this:
>
> I can configure URI-patterns for (non-)information resources, e.g.
>
> Non-Information-Resources: http:/example.com/id/{.*}
> RDF-Representation: http:/example.com/data/{.*}
> HTML-Representation: http:/example.com/page/{.*}
>
> The conneg and 303-redirection stuff should be handled automatically  
> so that i only have to implement what my application serves at these  
> uris.
>
> I have played arround with REST-Webservices as recommended. This is  
> what i do at the moment:
>
> I have a service at http:/example.com/id/person/0815 with methods  
> that are annotated to produce html  respectively rdf/xml. But  
> instead of serving the representations immediately I use  
> Response.seeOther to do a 303-redirect to http:/example.com/page/ 
> person/0815 respectivly http:/example.com/data/person/0815. This  
> works fine, but perhaps there is a more automated solution, that  
> does conneg as well as 303-redirect.
>
>>
>> But also:
>> http://www.w3.org/TR/cooluris/#hashuri
>> http://www.w3.org/TR/cooluris/#choosing
>>
>> If you can build your site with hash URIs rather than 303  
>> redirects, I highly recommend doing so.
>
> Thanks, i have thought about it, but hash-uris don't fit my needs.
>
> Kind Regards,
> Angelo
>
>

Received on Thursday, 27 May 2010 13:52:25 UTC