Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C10C610476 for ; Thu, 14 Nov 2013 18:31:05 +0000 (UTC) Received: (qmail 61805 invoked by uid 500); 14 Nov 2013 18:31:00 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 61660 invoked by uid 500); 14 Nov 2013 18:30:57 -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 61636 invoked by uid 99); 14 Nov 2013 18:30:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Nov 2013 18:30:53 +0000 X-ASF-Spam-Status: No, hits=0.5 required=5.0 tests=FROM_DOMAIN_NOVOWEL,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of brian@streampunks.com designates 209.85.192.169 as permitted sender) Received: from [209.85.192.169] (HELO mail-pd0-f169.google.com) (209.85.192.169) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Nov 2013 18:30:46 +0000 Received: by mail-pd0-f169.google.com with SMTP id y13so2352827pdi.0 for ; Thu, 14 Nov 2013 10:30:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=MGlaydIaYjx0KEvNpVvWkhnR3EF0x0XhzrUk1+aU+bg=; b=bQ5s9EzDERKfKXRatradE1lXF38EWkYvJsxF91mZcDlf3bTKbI+fMwNhcJqCAioY3L /VzXjr73L99TwAFv+nfdUtFIOoMbljpg3/iUuVYasKZZBd4DRVRzkDmoAl3iSqtK5Fct 8Wz9UxZySjPkEoVmweh+G98qb9hh9/QX6SnqEgevw9E/HIv4PXzfenJs0O+uRhrgbFL+ cs0ClFbCFTDjtJgzMbbZxKOT//qjpo98Gf5xWdehz7gEn8MO6QLm61MF48CPHFbuE15C ZXaAsVPtH5qIFBoMtuWXnPs9OfU2mwRc0CsNlqCglH/cW1zrFu5M8t2g1H7ooINO1ODg 3iZQ== X-Gm-Message-State: ALoCoQmgM/He4Iw6pK8nL4hV36BMGiMJ6hvYylQ+Dyk83zErMJy73WRBCCIqfXvb3xHiNSCeLgHK MIME-Version: 1.0 X-Received: by 10.66.161.38 with SMTP id xp6mr2693621pab.145.1384453825229; Thu, 14 Nov 2013 10:30:25 -0800 (PST) Sender: brian@streampunks.com Received: by 10.68.229.106 with HTTP; Thu, 14 Nov 2013 10:30:25 -0800 (PST) X-Originating-IP: [142.255.78.149] In-Reply-To: References: <75175787-0293-4918-9CC3-0CE24B8B41C6@programmazione.it> Date: Thu, 14 Nov 2013 13:30:25 -0500 X-Google-Sender-Auth: w0XT4zitjo2rfCUQyYnpoSbL114 Message-ID: Subject: Re: show/list From: Brian Mitchell To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Nov 14, 2013 at 1:24 PM, Benoit Chesneau wrote: > On Thu, Nov 14, 2013 at 6:58 PM, Filippo Fadda < > filippo.fadda@programmazione.it> wrote: > >> Any application that uses CouchDB as a pure database doesn't need show and >> list handlers. They are simply useless, in fact I didn't implement (yet) >> them in ElephantOnCouch library because I don't see any use case for them. >> And I'm not sure if I will never implement them, probably not. If you are >> using Ruby, Python, PHP, you'll never produce HTML directly from CouchDB, >> because there are frameworks in plenty with template engines aimed to do >> the job. >> I don't know the history about show and list, but they remember me Lotus >> Domino. Of course you need them if you are developing a CouchApp. >> >> -Filippo >> > > On the contrary I think they are very useful for a database. A rather smart > way to transform and query the data (doc or views). > > To do a bit of history the first proposal for them had only one handler > called "form", a way to format the data or send a form. We settled on a > simpler form distinguishing docs and views and the way to handle them. > Sometime after you had the updates functions. They are not per see related > to the couchapps. You can do couchapps without them. > > On the other contrary lists and shows are a way to handle in memory on the > server side the results you fetch and provides new results depending on the > params you pass to the URL. All results can the be streamed to the client. > They can replace in some cases the queries you can do on some dbs like the > relational db or some document databases with more capabilities of query by > default. After all most of a SQL query is handled in memory. > > But actually they have their caveats. They can be slow due to the way the > JS engine work. The way we can improve this is known (in fact there aremany > different way: improving the messages between erlang and js, adding a DSL, > using a native language..). The other thing that should be improved is the > way the lists are working. For now we can't access to more than one view > (or secondary index) in a list which means we can't do yet complex queries > based on multiple index(views) like a relational or others databases like > datomic can do. Such change should be easy though. > > In short I don;t think we should deprecate such functions. We should on the > contrary improve them. And stop to associate them to "couchapps". They are > not. Do you think such features would fit inside an appropriately crafted plugin system?