Return-Path: Delivered-To: apmail-incubator-couchdb-dev-archive@locus.apache.org Received: (qmail 94413 invoked from network); 29 Jul 2008 05:26:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Jul 2008 05:26:15 -0000 Received: (qmail 14674 invoked by uid 500); 29 Jul 2008 05:26:15 -0000 Delivered-To: apmail-incubator-couchdb-dev-archive@incubator.apache.org Received: (qmail 14459 invoked by uid 500); 29 Jul 2008 05:26:14 -0000 Mailing-List: contact couchdb-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-dev@incubator.apache.org Delivered-To: mailing list couchdb-dev@incubator.apache.org Received: (qmail 14447 invoked by uid 99); 29 Jul 2008 05:26:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Jul 2008 22:26:14 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of randall.leeds@gmail.com designates 209.85.200.169 as permitted sender) Received: from [209.85.200.169] (HELO wf-out-1314.google.com) (209.85.200.169) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jul 2008 05:25:19 +0000 Received: by wf-out-1314.google.com with SMTP id 27so4685870wfd.21 for ; Mon, 28 Jul 2008 22:25:28 -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:to :subject:in-reply-to:mime-version:content-type:references; bh=rZwCDNJQ1N1XjP8orc9EZzaIKVc7YDArQoo/POuk77g=; b=RKKeUNKSFHpENoONBQMpxitlbUOGH4eOT++pBlSohz5coDmhmH/IB6/Qvqu1FFxy/c dREZgsRQ8+FEws/VUeoA182W5efZzE/f9K1q2Dy4pCTdviGvw+fTxBT+798zdGkPd0fd Hz50l7yx3HbMk/JugsG/jrpPmA0x/guLH2xz4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=NQCER+f/PfcaXFqEC5VpWrvzHBgJQ2s0XTKbbRbcalUTcKyX4X7Cn7+QE5iqEb9T5B KZ28jqsqpIBxDz8sajwpsdee53V5iKqDbKl1/l2GXOmCfaeIvhTeCqzyQtfNxDGpD7cl Qv/qpkxPfTRSDYc6+htwn5JAo2pWRa8Pch+qQ= Received: by 10.142.218.6 with SMTP id q6mr1895870wfg.186.1217309128462; Mon, 28 Jul 2008 22:25:28 -0700 (PDT) Received: by 10.142.179.21 with HTTP; Mon, 28 Jul 2008 22:25:28 -0700 (PDT) Message-ID: Date: Tue, 29 Jul 2008 01:25:28 -0400 From: "Randall Leeds" To: couchdb-dev@incubator.apache.org Subject: Re: CouchDB Success Stories In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_23384_6909428.1217309128454" References: <5879e51d0807281729h490b946wc331b279403e8e8e@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_23384_6909428.1217309128454 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Mon, Jul 28, 2008 at 10:44 PM, Chris Anderson wrote: > On Mon, Jul 28, 2008 at 6:03 PM, Paul Davis > wrote: > > Just had a thought, with 20 views, how do you (and anyone else) manage > > to keep that straight? > > I have a script that keeps them on the filesystem as .js files (for > syntax highlighting and version control). > I've been using couchdb-python and storing my views in .py files as follows: The design doc stores functions whose map code reads "from my_views_module import my_map_function" I find this to be an elegant answer to the problem you're bringing up, if you're willing to write views in python. I've been thinking about writing a TextMate bundle to handle embedded > JS in Ruby (because I think it might be clearer to keep the views near > the functions that utilize them). The application using the database is also written in python, so my views are kept alongside the rest of the project's modules. It is also possible to unit test your view functions this way, as part of the test suite for your whole application. Very clean. I don't mean this to be a shameless python plug, but I do really like the way this works out! Randall Leeds ------=_Part_23384_6909428.1217309128454--