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 CD7687BC2 for ; Wed, 12 Oct 2011 09:23:38 +0000 (UTC) Received: (qmail 61791 invoked by uid 500); 12 Oct 2011 09:23:37 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 61434 invoked by uid 500); 12 Oct 2011 09:23:37 -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 61426 invoked by uid 99); 12 Oct 2011 09:23:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Oct 2011 09:23:36 +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 (athena.apache.org: domain of bchesneau@gmail.com designates 209.85.215.180 as permitted sender) Received: from [209.85.215.180] (HELO mail-ey0-f180.google.com) (209.85.215.180) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Oct 2011 09:23:31 +0000 Received: by eyg5 with SMTP id 5so695737eyg.11 for ; Wed, 12 Oct 2011 02:23:10 -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=MPjAE2DyzEbZSwuUCia05qMxvCATcSgQIDs7jf7sCh8=; b=LTvXevDEaQ5LAL4MoCooe6OoNFYhVxuYpA71vRP90B9gUt5p0m05T48zHBvrGa4S9M T66jsjat8IfGkeMp0OGZilK12sD05u0QdlUUpdHh3WMrRdTULZfH/cI+61gHAh5f0hN6 Exg6loBhpZTo0+L78TkqahPJEaW2LPdzL/u4Q= MIME-Version: 1.0 Received: by 10.213.34.16 with SMTP id j16mr750255ebd.72.1318411389842; Wed, 12 Oct 2011 02:23:09 -0700 (PDT) Received: by 10.213.25.133 with HTTP; Wed, 12 Oct 2011 02:23:09 -0700 (PDT) In-Reply-To: References: Date: Wed, 12 Oct 2011 11:23:09 +0200 Message-ID: Subject: Re: So here is an idea... From: Benoit Chesneau To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Wed, Oct 12, 2011 at 10:59 AM, Albin Stig=F6 wro= te: > 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