Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 79784 invoked from network); 3 Dec 2005 18:55:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Dec 2005 18:55:52 -0000 Received: (qmail 69995 invoked by uid 500); 3 Dec 2005 18:55:51 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 69425 invoked by uid 500); 3 Dec 2005 18:55:49 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 69414 invoked by uid 99); 3 Dec 2005 18:55:49 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Dec 2005 10:55:49 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [212.27.42.30] (HELO smtp4-g19.free.fr) (212.27.42.30) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Dec 2005 10:55:48 -0800 Received: from [192.168.0.100] (unknown [81.56.134.235]) by smtp4-g19.free.fr (Postfix) with ESMTP id 2D1BD4A8F3 for ; Sat, 3 Dec 2005 19:55:26 +0100 (CET) Message-ID: <4391EA1E.8060404@apache.org> Date: Sat, 03 Dec 2005 19:55:26 +0100 From: Sylvain Wallez User-Agent: Thunderbird 1.5 (Macintosh/20051025) MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: [RT][long] Cocoon 3.0: the necessary mutation References: <43908B84.7070909@apache.org> <4391DD5B.9080703@apache.org> In-Reply-To: <4391DD5B.9080703@apache.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Stefano Mazzocchi wrote: > Sylvain Wallez wrote: > > [snip] > >> Tell me your thoughts. Am I completely off-track, or do you also want >> to build this great new thing? > > Well, I've always been against dynamic pipelines and content-aware > selection. But yes, I've changed my mind. > > scripted sitemap, pull-driven events, dynamic pipelines, yes, it's > time for those. Great :-) > Not sure I understand what you mean by flow.sendMultiple() though. can > you explain in more detail what you mean there? This is useful in Ajax apps when a user action requires several different pages to be updated. Right after I sent the RT, I found a blog entry about the exact same use case I outlined[1]. In many use cases, there are several semi-independent areas in a page. By semi-independent, I mean that a user action in an area can, but not always, have an impact on what should be displayed in another area. In the shopping cart example, there's the catalogue area and the cart area. When you browse the catalogue, no need to redisplay the cart. But when you click "add to cart", you need to update both areas: the cart because its content has changed, and the catalogue to outline the chosen item and update the available stock. The knowledge of what areas are to be redisplayed is at the controler level, e.g. in the "addToCart" flowscript function. So the idea is to send back to the client a kind of multi-part response, each part being used to update an area of the browser page. Technically, this can be implemented by a generator that spits out a list of to an XInclude transformer, that will then call the individual pipelines for each of the updated parts. But that is really overly complicated, hence the idea to allow the controller to define this multipart response, and this flow.sendMultiple() method. The content of this response will actually be the same as what comed back to the browser with CForms in Ajax mode: a list of instructions, that the client-side JS places in the appropriate locations. Hope this is clearer. Sylvain [1] http://scottraymond.net/articles/2005/12/01/real-world-rails-rjs-templates -- Sylvain Wallez Anyware Technologies http://bluxte.net http://www.anyware-tech.com Apache Software Foundation Member Research & Technology Director