cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: Transparent and automatic AJAX support for Cocoon Forms
Date Thu, 21 Apr 2005 09:33:55 GMT
Michael McGrady wrote:

>Thought I'd pass on to the Struts list the great success and popularity Frank Zammetti's
ideas are having on the Cocoon list.


I'm very sorry, but the ajaxification of Cocoon has *nothing* to do with 
Frank Zametti's ideas. These ideas are *mine* and I *never heard of 
Frank before*. You should have read the detailed description of my work 
[1] to understand how different they are from Frank's very classical use 
of XHR (nothing original here - there are plenty of similar articles 

I took a completely different approach, requiring absolutely no 
page-specific client-side JS code. The use of XHR is totally transparent 
and the page writer doesn't have to care about it.

Client-side JS detects the availability of XHR in the host browser and 
uses it if it exists. Otherwise, a regular form post is done. On the 
server side, when answering to an XHR request, Cocoon produces partial 
page update directives, just by adding an additional transformer (it's a 
filter in Cocoon parlance) to the production pipeline of the regular 
full page. These update directives are then parsed by the client-side JS 
to update page parts that need to be updated.

The result is that, using a small generic client-side JS library (approx 
200 lines with comments etc), you can ajaxify any kind of form or page 
with most often nothing to do in page templates. And it degrades 
gracefully to full-page reloads on non ajax-aware browsers.

This is a very productive approach that avoids most classical problems 
of Ajax: there's no need for a lot client-side JS code that is difficult 
to make really cross-browser, difficult to test, avoids opening too many 
entry points in the application that could create security holes.

So please, rather than taking attribution when it's totally unjustified, 
consider learning from other's ideas.



Sylvain Wallez                        Anyware Technologies  
Apache Software Foundation Member     Research & Technology Director

View raw message