Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 66008 invoked from network); 10 Feb 2009 21:27:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Feb 2009 21:27:15 -0000 Received: (qmail 35751 invoked by uid 500); 10 Feb 2009 21:26:54 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 35725 invoked by uid 500); 10 Feb 2009 21:26:54 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 35635 invoked by uid 99); 10 Feb 2009 21:26:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Feb 2009 13:26:54 -0800 X-ASF-Spam-Status: No, hits=3.4 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.162.180] (HELO el-out-1112.google.com) (209.85.162.180) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Feb 2009 21:26:44 +0000 Received: by el-out-1112.google.com with SMTP id s27so42495ele.14 for ; Tue, 10 Feb 2009 13:26:21 -0800 (PST) MIME-Version: 1.0 Received: by 10.151.13.9 with SMTP id q9mr729714ybi.202.1234301181702; Tue, 10 Feb 2009 13:26:21 -0800 (PST) In-Reply-To: <20090210210928.GA19534@uk.tiscali.com> References: <20090210210928.GA19534@uk.tiscali.com> Date: Tue, 10 Feb 2009 16:26:21 -0500 Message-ID: <64a10fff0902101326n346eafj9628876eb0ca9c72@mail.gmail.com> Subject: Re: Database Disruption From The Couch From: Dean Landolt To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=000e0cd6a9587b3393046297234d X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd6a9587b3393046297234d Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Tue, Feb 10, 2009 at 4:09 PM, Brian Candler wrote: > On Mon, Feb 09, 2009 at 11:30:30AM -0800, Chris Anderson wrote: > > > (1) Personally, I'm not yet ready to move all view generation into the > > > browser (Futon-like), i.e. where Javascript fetches the JSON, reformats > as > > > HTML, and submits back as JSON. In any case, supporting browsers > without > > > Javascript is still a useful capability. > > > > The _show and _list features give you the capability to serve HTML or > > other content types directly based on either doc or view queries. They > > are a little lacking in documentation, but the test suite should be > > enough to get your started. > > Thanks. If I understand correctly, _show only acts on a single document? In > practice this may be less of a problem with couchdb than with a SQL-backed > system (where a single page often combines multiple models), but I can > still > see cases where I want to combine a document with some related summary > information from a view. Maybe this could be done with iframes. Or you could just use a simple ajax call to pull in any additional data. I can understand if you're looking to build the _show templates unobtrusively by merging more than one doc or even views on the server (and I wish there were a way to do that), but what's more *obtrusive *than iframes? ;) > Similarly, AFAICT _list is also basic: a header, N rows from a single view, > a footer. > > > If it doesn't work already, it'd be trivial to teach Couch to > > understand norm HTML form POSTs, with some bare-bones conversion to a > > JSON document (eg: each field is treated as a string, in a flat > > namespace) > > Again, I expect here that a single POST will only be able to update a > single > document. But the Rails-type way of doing nested parameters maps well to > JSON: > > foo[bar]=hello => {"foo":{"bar":"hello"}} > > foo[bar][]=hello&foo[bar][]=world > > => {"foo":{"bar":["hello","world"]}} One doc update per POST seems pretty like a reasonable design constraint for now -- if you want more, you can always go server side. But that's a pretty sexy solution to form serialization I hadn't even considered. Is there some way to also differentiate numerics? If so, that's *perfect*. --000e0cd6a9587b3393046297234d--