Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F0B8EDD76 for ; Wed, 26 Sep 2012 08:53:44 +0000 (UTC) Received: (qmail 85191 invoked by uid 500); 26 Sep 2012 08:53:41 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 84670 invoked by uid 500); 26 Sep 2012 08:53:30 -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 80577 invoked by uid 99); 26 Sep 2012 08:53:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Sep 2012 08:53:25 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of nslater@tumbolia.org designates 209.85.223.180 as permitted sender) Received: from [209.85.223.180] (HELO mail-ie0-f180.google.com) (209.85.223.180) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Sep 2012 08:53:17 +0000 Received: by ieje10 with SMTP id e10so774558iej.11 for ; Wed, 26 Sep 2012 01:52:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tumbolia.org; s=google; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=fNQBngYFy/wWYLriLX/kr/NOv9JJjvRULAGb+l65U5E=; b=JourjcrZc2Bio1HwyViRjUFKTymkNRAisDtBAKL4IIShDWr9YhHGMXjGDTI+issu9L uFK3fsrpDRcdj7cVhOEl9fcQ9eRGNrlNcZKfaRzJCgmODugFMe7ZEWdXG0UtCeymkq1Q pqVqsJLEgDlPnffVCXb6SPLVZZ/4VvnCXC0I4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:content-type:x-gm-message-state; bh=fNQBngYFy/wWYLriLX/kr/NOv9JJjvRULAGb+l65U5E=; b=fn61hbXmf0K7+L82Pe8R/ytYbAdyPR3cMwac+86KokRNMNfVlusDXZmsDeXP1+XoDa 8P8gSAukoKa58YXcaHwfnBSxe+Uucv8EjCXcYDg25AU2FkQcGGvIfnOeJE4EJGf5J8fG P4Nd+rFDc4ra0yJPfMLI5VcjrkwifraVHkXtxaLFN+aEnpFNehBw4TxEqlWGwG7mlm2f tzTCgcBOm6GN0GImmNV4rxvXYi8ji3wfXzVMEFmgT4yLFMJpWupVaL2CYrz1fa4npyjy 0JOdCV0HT67h4n+SeCwkqDsxPufOJfpwQz+VHlW0/ZiWG3vyn3jVH2z+OX8ihKFbcbJ4 wcFw== MIME-Version: 1.0 Received: by 10.50.140.74 with SMTP id re10mr10413169igb.52.1348649576749; Wed, 26 Sep 2012 01:52:56 -0700 (PDT) Received: by 10.64.63.19 with HTTP; Wed, 26 Sep 2012 01:52:56 -0700 (PDT) X-Originating-IP: [79.97.124.139] In-Reply-To: References: <5060B9C0.7010903@gmail.com> Date: Wed, 26 Sep 2012 09:52:56 +0100 Message-ID: Subject: Re: Part2: What's up dev? About couchapps. From: Noah Slater To: dev@couchdb.apache.org Content-Type: multipart/alternative; boundary=e89a8f83883bf2dba104ca96f214 X-Gm-Message-State: ALoCoQnoZGkI1KfVqXyHYfBgezpTrCXcw56epd+ulxQR0bSvs/RZJXfSCoOIoGuXSpOoBbE9+JN5 --e89a8f83883bf2dba104ca96f214 Content-Type: text/plain; charset=ISO-8859-1 I don't see the problem with this. If you were doing a Rails project, you wouldn't complain that you had to move your Ruby files into a specific structure. Nor would you if you were doing a Django project. In fact, for any system that uses the filesystem as state, it is fairly common to have structure. And as Benoit pointed out before, CouchApps are more than just uploading some HTML into CouchDB. On Wed, Sep 26, 2012 at 9:49 AM, Dale Harvey wrote: > I have a folder here with an index.html file in it > > Can I upload it to CouchDB as an attachment without moving it? last time > remember (admittedly a long time ago) I couldnt do that with erica nor the > couchapppy tool > > If not, I think that is one of the primary use cases that should be kept in > mind, despite the fact I wrote (yet another) one of these tools (and a fair > few patches to erica) I dont use them because even the very basic tasks > forced you into a couchapp specific workflow > > On 26 September 2012 09:05, Benoit Chesneau wrote: > > > On Wed, Sep 26, 2012 at 7:58 AM, Eli Stevens (Gmail) > > wrote: > > > On Tue, Sep 25, 2012 at 10:25 PM, Ryan Ramage > > wrote: > > >> 1) We have to decide on the directory structure. Based on what benoit > > >> and dale have brought up. I have opinions, along with others. Lets not > > >> rattle sabres around this yet. But pick something relatively user > > >> friendly, and straightforward. This can be actioned in our weekly irc. > > > > > > Would it make sense to have the directory structure be something that > > > isn't couchapp specific, and instead dump/load *entire databases* > > > to/from disk? I could see that actually making it a simpler tool, > > > since there would be a natural tendency to resist a bunch of > > > special-case handling for corner cases, ease of use, etc. Instead, > > > you'd end up with a directory full of: > > > > > > my_doc_id.json > > > my_doc_id.attachments/my_bin_file.dat > > > my_doc_id.attachments/my_image_file.jpg > > > etc. > > > > > > Then the various couchapp tools could focus on various workflows to > > > make creating the simple structure and calling the default DB load > > > tool. > > > > > > I'm not a couchapp user, so feel free to discard this idea if it > > > doesn't make sense or if it doesn't gain any traction. > > > > > > Cheers, > > > Eli > > > > The current structure isn't couchapp specific. In fact you can > > clone/push a doc using erica or couchapp (py the original). > > > > The structure reflect JSON properties on a doc, eg.: > > > > folder/item -> {"folder": {"item": "value"}} > > some.json will be addeded as {"some": contentofsomejson} > > _attachments/ will contains all attachements. > > > > Specific to ddoc : > > > > views/vname/{map,reduce}.js > > shows/ > > lists/ > > > > and even that is just the result of the structure above. The original > > idea is to allow anyone to create a couch app using the editor he > > want. That why you have plugin in eclipse, standalone editor on top of > > it it's really easy. Somehow it also follow the plan9 idea of having > > everything on the fs. > > > > Also as a side note the couchapp fs schema is widely deployed around. > > Even pubished a doc about it [1] > > > > > > - benoit > > > > [1] > > > http://www.ibm.com/developerworks/opensource/tutorials/os-couchapp/index.html > > > -- NS --e89a8f83883bf2dba104ca96f214--