From user-return-8242-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Sun Jan 03 21:32:17 2010 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 32657 invoked from network); 3 Jan 2010 21:32:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Jan 2010 21:32:17 -0000 Received: (qmail 78011 invoked by uid 500); 3 Jan 2010 21:32:15 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 77927 invoked by uid 500); 3 Jan 2010 21:32:15 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 77917 invoked by uid 99); 3 Jan 2010 21:32:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jan 2010 21:32:15 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jchris@gmail.com designates 209.85.216.180 as permitted sender) Received: from [209.85.216.180] (HELO mail-px0-f180.google.com) (209.85.216.180) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jan 2010 21:32:05 +0000 Received: by pxi10 with SMTP id 10so10408823pxi.13 for ; Sun, 03 Jan 2010 13:31:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type; bh=aH1KSx1k3V68pR02zKiEsIa+d1JUZnYZcHSisGoXotc=; b=qYQ1nytNWBFbD9J0Y5ZOoSgEzjZJosKVneTjrmcPq0Ykqnuvr3MUtfyiPo1zdBXD82 ium4XPb5wMIbDFY/RGsk6P0mUkC8CNb7F4ucURw618LsKP8mFKktWuf8APExyhjNGOOx OtDoekXuMdTgbTQzwFeHv9jdtcqNK2snb32MA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=YySPBkHramkuMAB/25YRU3Ij3tWpKzpRnnkaG9tfVXfiwztI5meAMT3mMuuNNFqwPM w/1x9AsrNv25OXxxUhIhr6vioxvCCjDhCZ7tX8uLo/2m4tEEOWzD4v7u6d6XSms3YiAR oHfif26PTT07BUnZU8Z8ayypZIfT9QMDC2XhQ= MIME-Version: 1.0 Sender: jchris@gmail.com Received: by 10.142.5.28 with SMTP id 28mr14866888wfe.82.1262554303575; Sun, 03 Jan 2010 13:31:43 -0800 (PST) In-Reply-To: <1bca98391001031203n4315e5f0j3f2cdfe4e7ceaa34@mail.gmail.com> References: <1bca98391001030457m52aca7d8lf77edd06375f41c6@mail.gmail.com> <1bca98391001031203n4315e5f0j3f2cdfe4e7ceaa34@mail.gmail.com> Date: Sun, 3 Jan 2010 13:31:43 -0800 X-Google-Sender-Auth: 4e53701a3482769e Message-ID: Subject: Re: sample couchdb application From: Chris Anderson To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 On Sun, Jan 3, 2010 at 12:03 PM, Matteo Caprari wrote: > Hi Chris. > > I haven't actually integrated nor automated anything: I run jsdoc > manually before each redeploy. I'm looking into an > integration with couchap but christmas got in the way and accomplished > nothing yet. > > I think I had some problems with ordering by question date because answers don't > have the question timestamp and didn't know what key to emit to keep > the item adjacent. The way I handle this in Sofa is by having two views: One would be all questions by date. The other is questions together with answers by date. (The question and answer groups are in this view in a random order). There's no sane way to do the second view with the questions also sorted by date... Chris > > But I like your optimism, so I'll try my head again and maybe ask again. > > I'll sync the app with your suggestions and post the results to this thread. > > thanks for your support. > > On Sun, Jan 3, 2010 at 7:07 PM, Chris Anderson wrote: >> On Sun, Jan 3, 2010 at 4:57 AM, Matteo Caprari wrote: >>> Hello list. >>> >>> I've cranked up a simple couchapp that mimics stackoverflow.com (if you squint). >>> >>> The idea is to understand couchdb better and provide the base for a >>> tutorial, but >>> before going any deeper, I'd like to hear from you what is wrong and >>> what is good. >> >> This is great stuff. Really cool. I still don't understand all of how >> you've integrated things, but the documentation is really a great >> addition. >> >> I think this is a really cool use case. Thanks for sharing! >> >> One concern I have is that I don't think you need to be building >> custom _ids. You should be able to accomplish your lists and shows >> without messing with custom ids, instead using document parameters in >> views. Custom ids generally just add code-overhead to apps and >> increase the chances of spurious conflicts. >> >> To avoid double posts, PUT with a random docid should be idempotent, >> and fail on duplicate PUTs. If you can't do PUT from your client the >> _bulk_docs POST api should work to, if you specify ids. See how >> jquery.couch.js has an API for getting UUIDs from the Couch and then >> using them on new docs. >> >> Also, in trunk _show is no longer happy to have bogus ids, you'll get >> a 404. You can invoke with no docid at all to accomplish your use >> case. >> >> I'm happy to help more so that when you write your tutorial it >> embodies best practices. Just post any questions to this thread! >> >> Cheers, >> Chris >> >> >>> >>> So please have a look, but don't expect too much. >>> >>> Demo: http://caprazzi.net:5984/fortytwo/_design/fortytwo/index.html >>> Docs: http://caprazzi.net:5984/fortytwo/_design/fortytwo/docs/index.html >>> Source: http://github.com/mcaprari/fortytwo >>> >>> Docs are created with jsdoc-toolkit and a custom template. >>> I think we could integrate it with couchapp to obtain a "view source" feature. >>> >>> -- >>> :Matteo Caprari >>> matteo.caprari@gmail.com >>> >> >> >> >> -- >> Chris Anderson >> http://jchrisa.net >> http://couch.io >> > > > > -- > :Matteo Caprari > matteo.caprari@gmail.com > -- Chris Anderson http://jchrisa.net http://couch.io