Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CDF94DFC7 for ; Sun, 23 Dec 2012 06:54:34 +0000 (UTC) Received: (qmail 98744 invoked by uid 500); 23 Dec 2012 06:54:33 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 98306 invoked by uid 500); 23 Dec 2012 06:54:26 -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 98254 invoked by uid 99); 23 Dec 2012 06:54:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Dec 2012 06:54:24 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jens@couchbase.com designates 206.225.164.29 as permitted sender) Received: from [206.225.164.29] (HELO EXHUB020-2.exch020.serverdata.net) (206.225.164.29) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Dec 2012 06:54:18 +0000 Received: from EXVMBX020-1.exch020.serverdata.net ([169.254.4.73]) by EXHUB020-2.exch020.serverdata.net ([206.225.164.29]) with mapi; Sat, 22 Dec 2012 22:53:55 -0800 From: Jens Alfke To: "user@couchdb.apache.org" Date: Sat, 22 Dec 2012 22:53:55 -0800 Subject: Re: Design docs and javascript function unreadable...? Thread-Topic: Design docs and javascript function unreadable...? Thread-Index: Ac3g2kaOz29NGL6PSSS4X82Vs9c/tw== Message-ID: References: <1355962106.12878.YahooMailRC@web181706.mail.ne1.yahoo.com> <1355967159.2425.YahooMailRC@web181706.mail.ne1.yahoo.com> In-Reply-To: <1355967159.2425.YahooMailRC@web181706.mail.ne1.yahoo.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_DF368BFC56B343DB84FBE4E97081695Ccouchbasecom_" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org --_000_DF368BFC56B343DB84FBE4E97081695Ccouchbasecom_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable On Dec 19, 2012, at 5:32 PM, Scott Weber > wrote: I cannot see how manually creating a slightly more complex function then th= ese examples would not be begging for mistakes when forced to de-beautify it manually for loading in through FUTON or curl. Then don=92t edit complex design docs using Futon or curl. Doing so is like= trying to edit a PNG file using a raw hex editor. There is no way to just tell "validate_doc_update" to load a function from = a whatever.js file? So the function can remain readable? If it were in a file it wouldn=92t replicate. Part of the point of design d= ocuments is that they replicate along with the rest of the database. In any case, I don=92t think it=92s a good idea to complicate CouchDB=92s s= torage model just to avoid the need to use a tool to assemble complex desig= n documents. It=92s really quite easy to use your favorite scripting langua= ge to encode JSON data and PUT it to a design document. Or you could use Co= uchApp, which is kind of like that on steroids. Alternatively, someone could improve Futon to make the contents of design d= ocuments more easily editable. For example, the web UI in Couchbase Server = 2.0 has a quite nice map/reduce editor that even has niceties like auto-ind= enting of the JavaScript code. =97Jens --_000_DF368BFC56B343DB84FBE4E97081695Ccouchbasecom_--