CouchDB - any alternatives to CouchApp? CouchDB - any alternatives to CouchApp? database database

CouchDB - any alternatives to CouchApp?


CouchDB is the DB thinked for the web, it's a RESTful API out of the box and that's why CouchApps are so simple, fast to develop, and doesn't need a backend because CouchDB it's actually your backend.

I know it's hard to maintain HTML pushed from CouchDB, it's expensive too, so the way I build CouchApps is creating a frontend App with Backbone, managing all my routes (friendly URLs), using templates (any templating framework, I use the simple requirejs !text), and develop the app as normal HTML/CSS/JS, making the Ajax calls to CouchDB Views (transforming the data with Lists, so just return clean JSON), and if I want a specific document do the same, just with Shows and I get JSON data again.

So at the end is working as a Web App talking with the RESTful API and interpreting that data to display it as you want.

Then you pushed that App to CouchDB (now it's a couchapp), so CouchDB it's actually serving your App to the final user and the API to your App.

Reduce:It's a powerfull algorithm, as you say is equivalent with SQL sum and count, you have that ones in CouchDB reduce too (_sum, _count, _stats).I recommend you to read this link to understand reduce, and rereduce.

http://www.ramblingincode.com/building-a-couchdb-reduce-function/


There's also a nodejs based tool called also couchapp - which is my tool of choice. here. It's Stable and battle-hardened.

Since in the end of the day With this tool you export a module which is the design-document, you can create whatever structure you like.

With a little smart setup with npm scripts involving webpack and couchapp, you can write your views in ES6 with arrow-functions, consts and stuff, transpile them to ES5 which greasemonky in CouchDB understands, and deploy them to your DB of choice in a sinlge-liner npm-script (you can obviously get even fancier...)


The alternative to the Python based CouchApp tool is the Erlang based Erica tool. In fact the former is now deprecated.