Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 65626 invoked from network); 25 Feb 2009 16:46:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Feb 2009 16:46:41 -0000 Received: (qmail 6052 invoked by uid 500); 25 Feb 2009 16:46:40 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 6008 invoked by uid 500); 25 Feb 2009 16:46:40 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 5997 invoked by uid 99); 25 Feb 2009 16:46:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Feb 2009 08:46:40 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of bchesneau@gmail.com designates 209.85.220.165 as permitted sender) Received: from [209.85.220.165] (HELO mail-fx0-f165.google.com) (209.85.220.165) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Feb 2009 16:46:32 +0000 Received: by fxm9 with SMTP id 9so90598fxm.11 for ; Wed, 25 Feb 2009 08:46:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=dD2dyhIbFyq2ysXuJZld5RLRuIqrVzSrtwuGUTMtCzo=; b=YHrVQpNJKJFE0MJYNsioXYW2x/akqqo2YbwOB2+8kvVezUqRlSf3ev5jjljebUY/Yx jwkk5VKe8XoLtnYcedJRzXICCVWFE01pHK54aiKDLGhft2LGSb3Jjssaf67+xenBGSmz 7ugEKz62+N/MLcwJEdAUFu1QOI9T5Brrc6rls= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=RiS8YHzPBFv5mmeSzPcm7fJxa7Zae2uilzRGv/vDCmTH5VmELHhz0HYFOHvFPAHVhQ Aj0pr57CMaoo9DsoS7QJI3jsopkQP6fOCpE51ZvlISRkOpN/ln6Mx+LvWFytyeV7Bmrc 3jeceRN5vSQ20qBAEF6j4c7THxQjd/F+hN8Mw= MIME-Version: 1.0 Received: by 10.86.99.9 with SMTP id w9mr1066921fgb.68.1235580372160; Wed, 25 Feb 2009 08:46:12 -0800 (PST) In-Reply-To: References: Date: Wed, 25 Feb 2009 17:46:12 +0100 Message-ID: Subject: Re: REST, Hypermedia, and CouchApps From: Benoit Chesneau To: dev@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org 2009/2/25 Chris Anderson : > Devs, ... > One way to fix this it to give the resources made available by a > design document a common root. This means we can use hrefs like > "_show/docid" to link to a show function from an attachment. =A0So we > get paths like this: > > /db/_design/foo/_view/bar?limit=3D10 > /db/_design/foo/_show/docid > /db/_design/foo/index.html > > The downside is that the URLs are longer (and that the change would > break all clients), the upside is the ability to link from one to the > other (and thus be part of the web). Since it allow relative urls i like this schema. I don't thin that url length is a problem. Urls could be easily rewritten and we may add add a url resolver that would consider views/shows/lists as endpoint I guess. > > =3D=3D A related question =3D=3D ... > Currently listing the available apps takes quite a few HTTP requests > (Futon has to load all the design documents in each DB). If CouchDB > wanted to support CouchApps more directly, it could provide a JSON > resource at /db/_design/ that lists all design docs, along with the > absolute path to their start page, if they have one. To list all databases I would for the damien's solution, ie a database that act as a directory . Maybe this directory could be created dynamically: each time a new design doc is created we could detected a couchapp property and then add to the directory. When it's deleted/updated same process ? - beno=EEt