From user-return-18277-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Wed Oct 12 09:28:05 2011 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 5F4317250 for ; Wed, 12 Oct 2011 09:28:05 +0000 (UTC) Received: (qmail 66452 invoked by uid 500); 12 Oct 2011 09:28:03 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 66429 invoked by uid 500); 12 Oct 2011 09:28:03 -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 66421 invoked by uid 99); 12 Oct 2011 09:28:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Oct 2011 09:28:03 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of albin.stigo@gmail.com designates 209.85.161.180 as permitted sender) Received: from [209.85.161.180] (HELO mail-gx0-f180.google.com) (209.85.161.180) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Oct 2011 09:27:57 +0000 Received: by ggni2 with SMTP id i2so756509ggn.11 for ; Wed, 12 Oct 2011 02:27:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=CirNXEKGo+K/Y+4DzPg2DzYAua7l3SKwe8WqFtE+PKA=; b=yAMiUctALcaEG/i1S+RLxF73bGHceMx+gm3kcmwM9DwxFRsBzGcRWnUcyLNt7zQb0s IqXGrJQhMPI8K3id7fUiHlovvdSWETooUlcYOxL/0HGwDz54jiO/LR2QjuqkqtHzsm2p JZTuiO5Y43zvv/+jxucbhVZ+GM7gSRIJH1yc8= MIME-Version: 1.0 Received: by 10.236.77.104 with SMTP id c68mr35103211yhe.69.1318411656496; Wed, 12 Oct 2011 02:27:36 -0700 (PDT) Received: by 10.147.172.13 with HTTP; Wed, 12 Oct 2011 02:27:36 -0700 (PDT) In-Reply-To: References: Date: Wed, 12 Oct 2011 11:27:36 +0200 Message-ID: Subject: Re: So here is an idea... From: =?ISO-8859-1?Q?Albin_Stig=F6?= To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org There you go! :-) On Wed, Oct 12, 2011 at 11:23 AM, Benoit Chesneau wro= te: > On Wed, Oct 12, 2011 at 10:59 AM, Albin Stig=F6 w= rote: >> Background: >> I've recently been doing a lot of Objective-C Cocoa development for >> the mac and iphone. For those of you that don't know Cocoa it's a MVC >> framework =A0(imho on of the best). >> In Cocoa you you rely extensively on something known as Key Value >> Observing (KVO) for keeping the View (UI) up to date with the Model >> (the logic part of your program). I.e. if you change the value of a >> variable (property) the ui element it is bound to automatically >> updates. >> >> The idea: >> I don't see any reason why this couldn't be done with CouchDB. Using >> CouchDB as the Model you could have a javascript library acting as >> View and Controller. You would then bind certain fields in your >> document to ui elements. The controller would long poll the changes >> stream and if the currently viewed document changes the ui can be >> updated appropriately (indicating a change or updated) >> >> tl;dr Instead of polling and updating. Is there something were you can >> just bind a doc to the ui and the library handles the rest? >> >> Is there something like this? >> >> --Albin >> > > backbone-couchdb : > > https://github.com/benoitc/backbone-couchdb > > - beno=EEt >