Armaz Mellati wrote:

-----Original Message-----
From: Sylvain Wallez [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 04, 2005 3:22 PM
To: [email protected]
Subject: Re: AJAX and Cocoon - Design Patterns

....

Where Cocoon can shine IMO with Ajax apps is that a website (not necessarily a 
webapp) is often split into several subpipelines that are aggregated. With 
Ajax, each of the areas that are normally aggregated in a full-page rendering 
model live their lives separately. What that means is that those pipelines that 
use to be internal-only will now be used both by the full page rendering (for 
the first page display or non-Ajax browsers) and for individual Ajax updates.

Hmmm, for instance in portals ? I have been thinking about it. Can we let each 
portlet live its own life using Ajax ?


Oh sure, definitely! IMO, portals are an area that will quickly be reshaped with the adoption of Ajax. Why do we have to reload a whole page when each portlet can live its life independently?

Inter-portlet communication is very likely to change too, involving client-side notification: when a portlet is updated through Ajax and this update has some consequences on other portlets on the page, the reloading can be triggered on the client by the refreshing of the original portlet. Another option is that acting on one portlet sends back updates for all the affected portlets.

The soon-to-be-released CForms+Ajax uses this technique with the "browser-update" transformer to modify several parts of the page. I'll be doing a presentation on this topic next friday at the GT (presentation material will be online).

In my portal, I have a portlet that needs updating each minute. Right now I have to update the whole page fo that. Even if the caching stuff helps, but the whole page needs to be sent to the browser. With Ajax that portlet can refresh itself alone:) Maybe someone should make an Ajaxcoplet ?

Or simply use the Ajax.PeriodicalUpdater JavaScript class that comes with Scriptaculous, and will be included in 2.1.8. There's a very simple example [1] calling a pipeline every 2 seconds to display the memory available on the server.

Sylvain

[1] http://svn.apache.org/viewcvs.cgi/*checkout*/cocoon/blocks/ajax/trunk/samples/file-browser.xml

--
Sylvain Wallez                        Anyware Technologies
http://people.apache.org/~sylvain     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to