couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Randall Leeds" <>
Subject Re: CouchDB Success Stories
Date Tue, 29 Jul 2008 05:25:28 GMT
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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message