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 B98861099C for ; Thu, 14 Nov 2013 20:35:07 +0000 (UTC) Received: (qmail 74148 invoked by uid 500); 14 Nov 2013 20:35:06 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 74110 invoked by uid 500); 14 Nov 2013 20:35:06 -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 74102 invoked by uid 99); 14 Nov 2013 20:35:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Nov 2013 20:35:06 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kxepal@gmail.com designates 209.85.212.179 as permitted sender) Received: from [209.85.212.179] (HELO mail-wi0-f179.google.com) (209.85.212.179) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Nov 2013 20:35:01 +0000 Received: by mail-wi0-f179.google.com with SMTP id fb10so25858wid.0 for ; Thu, 14 Nov 2013 12:34:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=GZS+1ggCAVGwNoCSBSmjpsafKprmt+6qE/TfpNGInhI=; b=DMo7XqBTZGVOqXw0aI6Jb2Yk2LbakPbzCxELQ7Hd1Yj8Simx+wkLdjprnkO+E3Cf1c j2JnYyxCcSZJjEE/qltMgmYbFNjoSeUYBqCyAkAq0k5jiFMlbKFM2acHSzw8Oa2kzbQY I9NBRsX483M1eLGzbiQDFDcsZfMQMYDaMIWLWGASjS2t3RpV/L4hYBFaQ1Xq+xxPrlFG YOas8j2OIKD8H55egUXgbnJDrLDu/vf16JGV43W0jR0Tr1/GNhH0II0LFcSbqBAsqeve zlHYZJweGhh+EwuX5nfwj6joNL/hTd9ZVqx1ptmH77CkIkLllvuTE7EoSCr23RO4I52L it6A== MIME-Version: 1.0 X-Received: by 10.180.79.230 with SMTP id m6mr4609904wix.19.1384461280755; Thu, 14 Nov 2013 12:34:40 -0800 (PST) Received: by 10.180.24.99 with HTTP; Thu, 14 Nov 2013 12:34:40 -0800 (PST) In-Reply-To: References: <75175787-0293-4918-9CC3-0CE24B8B41C6@programmazione.it> Date: Fri, 15 Nov 2013 00:34:40 +0400 Message-ID: Subject: Re: show/list From: Alexander Shorin To: "user@couchdb.apache.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Fri, Nov 15, 2013 at 12:06 AM, Filippo Fadda wrote: > > On Nov 14, 2013, at 8:08 PM, Alexander Shorin wrote: > >> On Thu, Nov 14, 2013 at 9:58 PM, Filippo Fadda >> - Provide different from JSON response to clients: browsers, >> non-couchdb clients (mostly xml driven), etc. > > You can do them in PHP or Ruby. In Rails you need 2 lines of code. > I'm not gonna to expose my database just to serve some different client, = all the urls are handled by a web server and I will serve any client from t= he web server. Security, consistence, scalability. Why I do need PHP or Ruby, when CouchDB is able to do the same without them?(: Having yet another technology in whole system only raises his complexity and reduced fault tolerance. >> - Transform response without sharing same logic with every client. > > You are missing something here. In a modern application all clients are h= andled by the same web application. The application provide the right answe= r in function of the caller. Browser will receive HTML, rss consumers will = receive XML, third part applications will receive JSON from APIs. So, your show/list function returns right content depending on Accept header or format query parameter. See no problem there. >> Oh, get ready to be smashed by Javascript guys - there are a lot of >> tools to make rich JS couchapps (: > > I know, but as Joan wrote in his presentation, if you are using a framewo= rk (Rails, Django, Phalcon, Zend Framework, Symfony, Sinatra, Bottle, Lavar= el and many others), those handlers are useless, at least for the purpose d= escribed in the documentation. You don't need them, you are just gonna comp= licate your life. Yes, if I'm using any mentioned framework I'll better take Postgresql (omg, what I'm say!) since now my database is just database, not application server like CouchDB is. P.S. We have different use cases and there are different requirement are applied to CouchDB to his features. Like with those Postgresql why do you need PL/pgSQL feature when you can do the same on your app side?