Mercurial > browser-couch
changeset 87:ebf8936fc696
More tutorial additions.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Mon, 20 Apr 2009 18:09:38 -0700 |
parents | f65007998121 |
children | bd715a1149ea |
files | tutorial.html |
diffstat | 1 files changed, 14 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/tutorial.html Mon Apr 20 17:50:37 2009 -0700 +++ b/tutorial.html Mon Apr 20 18:09:38 2009 -0700 @@ -21,8 +21,19 @@ software. It currently lacks a lot of CouchDB's features that it ought to have, and its API is not stable at all.</p> +<p>Finally, a note about the code examples in this tutorial: they're +actually being executed in your browser, and their output is sometimes +being displayed in this tutorial too. While this helps ensure that the +software is working as intended and also allows for some interactive +learning opportunities, right now it also means that some parts of the +code examples may look a bit unusual. Furthermore, if you see any +conspicuously blank areas in this tutorial, it could be because the +tutorial code crashed—our apologies if this occurs.</p> + <p>With that out of the way, let's get started.</p> +<h1>Getting Started</h1> + <p>Suppose we want to add offline support for a blog. To get a database called <tt>blog-posts</tt> in BrowserCouch, you can use the following function:</p> @@ -125,7 +136,7 @@ This explains what the <tt>values</tt> argument passed to <tt>reduce()</tt> is.</p> -<p>The <tt>keys</tt> argument is a list of two-tuples, the first of +<p>The <tt>keys</tt> argument is a list of 2-tuples, the first of which is the key, and the second of which is the document id that emitted the key during the map phase.</p> @@ -183,8 +194,8 @@ <p>There's features in the API that aren't covered here, so check out the check out the <a class="intra-wiki" -href="index.html#js/tests.js">annotated source code for the test -suite</a> for more sample code.</p> +href="index.html#js/tests.js">test suite's annotated source code</a> +for more examples.</p> <script src="js/ext/jquery.js"></script> <script src="js/browser-couch.js"></script>