Skip to content

What is a CouchApp?

January 30, 2011

CouchDB is a nifty document datastore with awesome replication and recovery capabilities. Replicating your data to another site has never been easier, it just works. Another cool feature is that you can create a web-application directly in CouchDB with no additional software.

In addition to regular documents CouchDB can store what are known as “Design Documents”. Design Documents are designated by the _id: _design/docname (they are the only documents that allow a / in the id). These documents must follow a specific schema that CouchDB uses to serve your application.

Typically, your design documents will have special functions called “views” which are described in a “views” field that generates views of your data.

You can do all of your development manually but it’s a pain writing javascript code as standard JSON strings. Instead, there are tools available that allow you to write your app logic in standard JavaScript and the tool will “Json Stringify” it to JSON before uploading it to your CouchDB.

Along with tools for creating Couchapps, there are also serverside JavaScript libraries that you can use to speed up your development. Node, Step, Moustace are some popular libraries. Node is one of the core libraries for writing server side JavaScript code. Step is a node package (see NPM) that makes writing for Node easier to understand. Moustache is a templating library for rending output to the client.

All this is pretty cool. I like the idea of having the ability to easily replicate your app to users. It’s really THAT easy.

Here’s a cool tutorial that I found: http://couchtim.github.com/clubhouse/

Advertisements

From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: