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 BEE84C5DA for ; Fri, 8 Jun 2012 19:13:53 +0000 (UTC) Received: (qmail 24305 invoked by uid 500); 8 Jun 2012 19:13:52 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 24265 invoked by uid 500); 8 Jun 2012 19:13:52 -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 24257 invoked by uid 99); 8 Jun 2012 19:13:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jun 2012 19:13:52 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of pulkitsinghal@gmail.com designates 74.125.82.180 as permitted sender) Received: from [74.125.82.180] (HELO mail-we0-f180.google.com) (74.125.82.180) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jun 2012 19:13:45 +0000 Received: by weyt11 with SMTP id t11so972171wey.11 for ; Fri, 08 Jun 2012 12:13:25 -0700 (PDT) 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; bh=dQSI25xxxgJVUvPZNgh6SvmdYx9cHuBikA9sTSKPnfU=; b=yJ5hyiDDDKi7Vs7SMCdFF8eZdFWD79VpYRbOorYSCQqCAjkRWb6uG6wzOQE3nR311b L+hSb3Wgkq64pFFAz9BXFX5SUFEsMjZ0yTRPfv+kEtSe0Vs8BBqiFiUyduKnhHcMPqLV LHDzs1KkSgEBJv8lzsrwVkbIfPd2qm5ItzxSlWAb7EeCRJkE3aJGPh6dDLUQJjXcCRF9 N1j4UCeyMR4xPiIz3oboXooVwz9BZKVPellzsrcZz2ra++FqZfd0AlJy/evrHtFc8TJ5 nGUp+tJnO2rtn5La/ARYKZs/pNpSkPJEZX3F3NdCAcX+WSznelluUo5ctfY1shxWuDzU b9qw== MIME-Version: 1.0 Received: by 10.216.218.138 with SMTP id k10mr1991698wep.222.1339182805610; Fri, 08 Jun 2012 12:13:25 -0700 (PDT) Received: by 10.217.0.6 with HTTP; Fri, 8 Jun 2012 12:13:25 -0700 (PDT) In-Reply-To: References: Date: Fri, 8 Jun 2012 14:13:25 -0500 Message-ID: Subject: Re: Node.js client for CouchDB From: Pulkit Singhal To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=0016e6d58a906af2c904c1facbe4 --0016e6d58a906af2c904c1facbe4 Content-Type: text/plain; charset=UTF-8 Ahoy Mark! Thank you so much for validating that I'm not the 1st person ever who thought of reusing futon. Some follow-up Qs: 1) The code that you modularized, rewrote and purged sync from ...Is it available on GitHub or somewhere else in the open source community by any chance? 2) What do you mean here? "no benefit in my code to having the same code run both places" 3) I'm not sure if nano is offering authN or https so I'm still looking into that. I had started out rolling my own non-re-usable solution by using Mikeal's request module but I wised up and am looking into Nano now. Slowly but surely. Cradle's next, thanks to all the folk who pointed it out. On Fri, Jun 8, 2012 at 12:25 PM, Mark Hahn wrote: > > I find myself wondering why someone hasn't simply taken the javascript > code that > runs Futon and dropped it into a node.js module? > > I did something like that. I wrote a module that was a clone of jQuery > that just implemented the ajax with http.requests. Then I made minor mods > to the jquery code supplied with futon to make it a module. So I was able > to write DB code that ran on the server and client with no mods. > > I found 3 reasons to not do this ... > > 1) The futon driver used a sync ajax call which was impossible to implement > in node. I had to rewrite some of the code. The person at microsoft who > decided to include an sync call should be shot, as well as the futon coder > who used it. > > 2) The futon driver used non-standard callback returns. Different > callbacks were used for success and error. > > 3) I discovered there was no benefit in my code to having the same code run > both places. > > So I switched to nano. I love nano. I'm using rpc's over socket.io to get > db access from browser. > --0016e6d58a906af2c904c1facbe4--