Skip to Main Content
CouchDB: The Definitive Guide
book

CouchDB: The Definitive Guide

by J. Chris Anderson, Jan Lehnardt, Noah Slater
January 2010
Intermediate to advanced content levelIntermediate to advanced
272 pages
6h 41m
English
O'Reilly Media, Inc.
Content preview from CouchDB: The Definitive Guide

Chapter 11. Managing Design Documents

Applications can live in CouchDB—nice. You just attach a bunch of HTML and JavaScript files to a design document and you are good to go. Spice that up with view-powered queries and show functions that render any media type from your JSON documents, and you have all it takes to write self-contained CouchDB applications.

Working with the Example Application

Note

If you want to install and hack on your own version of Sofa while you read the following chapters, we’ll be using CouchApp to upload the source code as we explore it.

We’re particularly excited by the prospect of deploying applications to CouchDB because, depending on a least-common denominator environment, that encourages users to control not just the data but also the source code, which will let more people build personal web apps. And when the web app you’ve hacked together in your spare time hits the big time, the ability of CouchDB to scale to larger infrastructure sure doesn’t hurt.

In a CouchDB design document, there are a mix of development languages (HTML, JS, CSS) that go into different places like attachments and design document attributes. Ideally, you want your development environment to help you as much as possible. More important, you’re already used to proper syntax highlighting, validation, integrated documentation, macros, helpers, and whatnot. Editing HTML and JavaScript code as the string attributes of a JSON object is not exactly modern computing.

Lucky for you, we’ve been ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Getting Started with CouchDB

Getting Started with CouchDB

MC Brown
Scaling CouchDB

Scaling CouchDB

Bradley Holt
Cloud Native Go

Cloud Native Go

Matthew A. Titmus

Publisher Resources

ISBN: 9780596158156Errata Page