Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 62087 invoked from network); 18 Oct 2010 19:30:02 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 18 Oct 2010 19:30:02 -0000 Received: (qmail 60628 invoked by uid 500); 18 Oct 2010 19:30:00 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 60555 invoked by uid 500); 18 Oct 2010 19:30:00 -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 60547 invoked by uid 99); 18 Oct 2010 19:30:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Oct 2010 19:30:00 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of industral@gmail.com designates 74.125.82.180 as permitted sender) Received: from [74.125.82.180] (HELO mail-wy0-f180.google.com) (74.125.82.180) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Oct 2010 19:29:53 +0000 Received: by wye20 with SMTP id 20so1607313wye.11 for ; Mon, 18 Oct 2010 12:29:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=Tt5vFEBAHtF/EViBVnUvahQ7tzYSUz1aYvg7rdHalBg=; b=CC+dUVRqvKs59rlJ3JWyWNweRlLsMTRdWogijziWQrv4yI1WLUhnvb6T8u85S/CQ8W ht7uAJTYqYn9+rvwoeVD2vT4w0wkI08xmq4kZXv14jGky4PoKDrBMKe3UHXXW94J+MKy IMmLjdj0n7dvX8RcZRjdmqPb5mC2Yb3+O5po8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=tgbOeY6/mRxEVL/1WJQCudXpNO/PkiUNpQE3IJARR/7oGRdl2hN8MUIdneK32V6vKJ NMJ5i6c4RuqBqWleGbN/y0rtzLqzdIA5ZO4fGYXhDI2N3IzAGdJ6keUTU0ZXBQCu9NlN PVJgPZSu/8jx65qrGSDoj/xGuxzk7JLrfqVKI= Received: by 10.227.127.134 with SMTP id g6mr3079511wbs.54.1287430171310; Mon, 18 Oct 2010 12:29:31 -0700 (PDT) Received: from [192.168.1.39] (147-0-124-91.pool.ukrtel.net [91.124.0.147]) by mx.google.com with ESMTPS id b30sm11102711wbb.10.2010.10.18.12.29.29 (version=SSLv3 cipher=RC4-MD5); Mon, 18 Oct 2010 12:29:30 -0700 (PDT) Message-ID: <4CBCA016.7010201@gmail.com> Date: Mon, 18 Oct 2010 22:29:26 +0300 From: Alex Ivasyuv User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8 MIME-Version: 1.0 To: user@couchdb.apache.org Subject: Re: CouchDB quoted functions References: <4CBC6F1A.6020305@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 10/18/2010 07:03 PM, Paul Davis wrote: > On Mon, Oct 18, 2010 at 12:00 PM, Alex Ivasyuv wrote: > >> Hi, >> >> I working with _update handlers in CouchDB, and writting functions for them. >> As per http://wiki.apache.org/couchdb/Document_Update_Handlers these >> functions should be quoted, as document should be presented as JSON. >> >> I faced an issue, that my functions became large and large, and it's very >> difficult to edit them right in browser (Futon). >> I found, that editing functions for view is more easyly, as there're >> provided some useful UI. >> But I didn't find the same for design docs. >> >> So the questions are: >> >> 1. Is there a simple way for editing _update handle functions right in >> browser with code formatting, like for views? >> > I don't think there's a UI for editing _update handlers yet. > > >> 2. Are there some tools, to wring a view code in separate file, and later >> transform it to JSON? >> >> > Try the couchapp scripts that will load a file system layout as a JSON document. > > You might also want to learn about the CommonJS module system for > importing code into your functions. > > HTH, > Paul Davis > > >> Thanks in advance, >> >> >> Thanks Paul, you saved my time!