incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Chesneau <bchesn...@gmail.com>
Subject Re: couchdb and linked data
Date Thu, 18 Jun 2009 13:00:32 GMT
2009/6/18 Nils Breunese <n.breunese@vpro.nl>:
> Douglas Fils wrote:
>
>>  Thanks much!  I did in fact miss this.  Wow..  I'm really excited now
>> about couchdb's potential in a linked data ecosystem.
>
> Yes, being able to write show functions is nice, but you'll have to request
> another URL if you want the document in a non-JSON format, which is not
> really the REST way of doing business.
>
> Of course you can just always request the show function URL, also for JSON
> output, but AFAIK the output of show functions is not prerendered by CouchDB
> (yet?), so performance-wise it might be better to go to the document-URL
> itself directly if you want JSON. Are there any plans to (maybe optionally)
> prerender the output of show functions? Maybe this is even possible for list
> functions if heads, rows and tails are prerendered separately?
>
> Nils Breunese.
>


Something like this woudl allow you to follow REST principle :

function(doc, req) {
  return respondWith(req, {
    "html": return { body: "somehtml" },
    "json": return { "headers": "Content-Type: application/json", json: doc }
  }
}


But only for get for now.

- benoît

Mime
View raw message