Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 58924 invoked by uid 500); 11 Sep 2002 12:37:30 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 58785 invoked from network); 11 Sep 2002 12:37:29 -0000 Message-ID: <01b501c25990$05137880$0100a8c0@MAUCHI> From: "Ivelin Ivanov" To: References: <3D7EFFCE.5060601@anyware-tech.com> Subject: Re: [control flow] changes and new sample Date: Wed, 11 Sep 2002 07:37:40 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N How about callbacks. Instead of doing sendpage( pageName ) and expecting the flow to continue on the next line, we could use sendPage ( pageName, callbackMethodPointer ) This way we avoid the need to suspend threads. However if we consider this option, then how about simply using event handlers for each submit button. This avoids the long if/else blocks. Event handlers is what JSF, .NET, and many other frameworks before that used to do. Although it is very easy to implement, I chose not use event handlers in XMLForm until there is strong interest for it. Usually an Action is concerned with one specific form and the flow associated with it is relatively simple. Thoughts? Ivelin ----- Original Message ----- From: "Sylvain Wallez" To: Sent: Wednesday, September 11, 2002 3:33 AM Subject: Re: [control flow] changes and new sample > Christopher Oliver wrote: > > >Hi Ivelin, > > > >Actually I believe it is possible to have continuations in pure Java -- > >using bytecode rewriting -- however this approach is quite intrusive and its > >effect on performance and code-size is not insignificant (see: > >http://www.cs.kuleuven.ac.be/~tim/MOS/brakes.html). Nevertheless the > >performance of such instrumented code would likely still be significantly > >faster than interpreted Rhino. I think it would be interesting to prototype > >such an approach. If someone is interested in doing this for Cocoon, I > >suggest they contact the authors of Brakes and see if they might be > >interested in contributing their code to Apache. Given that I think it would > >be fairly straightforward to set up a pure Java flow layer similar to what > >Ovidiu has done with JavaScript. > > > > > > Exactly my thoughts. I studied a bit what's done in Brakes and IMHO what > brings complexity here is that a thread can be suspended/resumed at any > point of its execution, and I believe continuations are easier to > implement since they are suspended and resumed in well-kown places. > > This is one of my current background thinkings, and I plan to prototype > something if - as always - I find time for it. > > Sylvain > > -- > Sylvain Wallez > Anyware Technologies Apache Cocoon > http://www.anyware-tech.com mailto:sylvain@apache.org > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org > For additional commands, email: cocoon-dev-help@xml.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org For additional commands, email: cocoon-dev-help@xml.apache.org