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 7C23BDE58 for ; Tue, 2 Oct 2012 14:14:50 +0000 (UTC) Received: (qmail 4291 invoked by uid 500); 2 Oct 2012 14:14:50 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 4223 invoked by uid 500); 2 Oct 2012 14:14:49 -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 4207 invoked by uid 99); 2 Oct 2012 14:14:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Oct 2012 14:14:49 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bchesneau@gmail.com designates 74.125.83.52 as permitted sender) Received: from [74.125.83.52] (HELO mail-ee0-f52.google.com) (74.125.83.52) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Oct 2012 14:14:44 +0000 Received: by eekb57 with SMTP id b57so2735074eek.11 for ; Tue, 02 Oct 2012 07:14:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=a3iMHRpycNGrJuOKLXqgBdlUPB4yXrZAqO/SsvggPxU=; b=W3nc8tN+w8tmwo7sSoaTuUB07E3Y2kfeq4eEitfw6N20g0w85UTjremKpL0mwn0rnl 0clU7EQ7B8z4Yrdy8IcLiS2DUsfNR7D0cgSA6Z8klUT99MsmBxlVlwe5ZrKID8GNeCxb TK58+ESqHDGZTZq7LoUcyzZu9CQLT3TJPX2nFbD9PTit9VeG/DhCF1LKyXtWd84oQ1Lr GJuCoCIWB6FE1FjqeBMBEUHGVm/fN9wjtvnid3awcMmVGj6QACJ68asaiOgJFufsKlAF XWi57RquWhlggkKjULIC5tU7+VEKsrZycpZjm8ML1LGf9uEKARp2VMowPBQ6P4Zs8voa phNQ== MIME-Version: 1.0 Received: by 10.14.213.201 with SMTP id a49mr22770244eep.4.1349187263508; Tue, 02 Oct 2012 07:14:23 -0700 (PDT) Received: by 10.14.175.196 with HTTP; Tue, 2 Oct 2012 07:14:23 -0700 (PDT) In-Reply-To: References: <5060B9C0.7010903@gmail.com> Date: Tue, 2 Oct 2012 16:14:23 +0200 Message-ID: Subject: Re: Part2: What's up dev? About couchapps. From: Benoit Chesneau To: dev@couchdb.apache.org Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Wed, Sep 26, 2012 at 1:36 PM, Dave Cottlehuber wrote= : > TL;DR +1 for including erica[1] into CouchDB proper. > > To summarise a bit: > > There are about 3 key things that all couchy tools do [1]=85.[5]: > > - transform local js and erlang functions in separate files, into > design doc format > - include necessary libraries and attachments into those ddocs > - upload that ddoc into CouchDB > > and optionally: > - support cloning ddocs (downloading and reversing the transformation) > - pushing arbitrary json docs with optional attachments > - pre/post hooks to minify, uglify, etc > - package mgmt > - keep some local state & store it in the ddoc to avoid unnecessary > transfer of attachments > > We need to make the first steps when moving past using futon as easy > as possible, and consistent across platforms, with a minimal tooling > requirement. Node is awesome but is moving way too fast, and erlang is > the logical next choice. > > If Benoit is willing, a slimmed down erica[1] code could be included > into CouchDB proper, or at least blessed as the canonical version. > It's in erlang, & with some rebar magic you have a stand-alone escript > that can be located anywhere in your path. The only additional code > I'd like to see is that it supports multiple ddocs, and handle > uploading normal docs as well as ddocs. It could be done really fast. So if I summarize the needed features for an initial release, that would be: - take an fs structure and send it as a ddoc to couchdb. The fs structure would handle js functions (shows, update, lists, views & validations) as separate files + attachments - upload this ddoc to couchapp I would add the possibility to ignore some files in the folder (the .couchapp ignore files) Other possible features: - handle multiple sources for attachments (?), can be done maybe by adding multiple sources folders) - send multiples ddocs from one folder - handle arbitrary jsons + their attachments - hooks - clone a ddoc to the fs - ddoc templates Currently handled by erica: - take an fs structure and send it as a ddoc to couchdb. The fs structure would handle js functions (shows, update, lists, views & validations) as separate files + attachments - upload this ddoc to couchapp - clone a ddoc to the fs - ignore some files in the folder - macros to include files inside a js functions (do we still need it with the commonjs feature) ? - ddoc templates : allows to reuse a structure and ship it to others. (useful to distribute some js frameworks structure or corporate templates) - web editor/viewer Would be interesting if we can decide on the features to have if we follow this way. Tthere is still the possibility to generate a database with futon and other couchapps we support) when we create a release. Also what would be the name? - benoit > > Personally, I only really understood ddocs after using CouchDB for > quite a while. I suspect I am not alone in this! > > [1]: https://github.com/benoitc/erica > [2]: https://github.com/mikeal/node.couchapp.js > [3]: https://github.com/kanso/kanso > [4]: http://reupholster.iriscouch.com/reupholster/_design/app/index.html > [5]: https://github.com/quirkey/soca > > A+ > Dave