On Sun, Sep 13, 2009 at 8:55 PM, Chris Anderson <[email protected]> wrote: > On Sun, Sep 13, 2009 at 10:37 AM, Vlad GURDIGA <[email protected]> wrote: >> On Sun, Sep 13, 2009 at 1:17 AM, Benoit Chesneau <[email protected]> wrote: >>> On Sun, Sep 13, 2009 at 10:12 AM, Vlad GURDIGA <[email protected]> wrote: >>>> It seams intuitive that _show actually shows you something and does >>>> not handle update actions. >>>> >>> I agre that it in this case show isn't a good word. maybe "_page" and >>> then "_pages" for _list but that another debate. >>> >>>> On the other hand why would we need an _update thing? Doesn't CouchDB >>>> handle that itself? >>>> (Excuse me if the question is stupid, I was not on #couchdb at the >>>> time when this discussion took place.) >>>> >>> >>> >>> _upate allow you to handle any input before saving them in couch like >>> xml, csv whatever or it could be also use to post some doc without >>> requiring ajax to do it. >> >> To me, keeping the server simple (which also means less complicated >> and buggy) and fast looks like a very nice idea. Splitting the >> computation burden between clients and server looks to me like a fair >> enough trade this time. >> >> And, I believe that the several percent of the clients that do not >> speak AJAX or cannot produce JSON should not dictate such a big change >> in CouchDB. >> > > The notion is that by allowing non JSON updates, we are available to a > wider range of clients without using a middle tier.
Excuse me, can I ask: what clients are you thinking about? And regarding middle-tier: wouldn't that _update logic be the middle tier now when it sits between HTTP-client and DB? > So in particular a browser with JavaScript turned off could make a > regular form post to an _update handler and it would manage parsing it > into JSON and saving it. I'm a web-developer for a few years now and it seams to me that i's not really serious to turn Javascript off in a Web 2.0 world. I think that it's just a very few paranoid people that do that. Event fewer browsers do not support Javascript at all. Both of those groups will be gone anyway in a few years, this is why I believe we should prepare for the future more apt clients. > I'm not sure about whether update should be the same as _show - it may > be more restful in some cases, but as Jan mentioned, there are times > when a single update request might result in multiple documents, in > which case it's own resource makes more sense. Could you please give an example of such a scenario? I just want to be sure that I get it right. Thank you!
