Ajax in Portlets

Currently two major hyped technologies in web application development are Ajax and Portal/Portlets. I feel developers need to re-format their coding strategies to fully exploit Ajax, servlet and portlet technologies.

I feel these technologies can go hand in hand very well. One of the problems with portlets is that, each page contains output from several portlets. Each time the page is rendered all the Render methods are called. Thus a lot of content is transferred at a time. Of course one of the method is through Cache. It solves this problem to some extend. By using caching the Render method for that portlet is not called for a prescribed period of time. Though at times it might not be the viable solution. But in either case the content to be transferred from server to client machine remains quite huge.

This can be answered by using AJAX. At situations where the whole page is not required to be rendered again, we can use Ajax very effectively. Currently to communicate Ajax in Portals we need the use of servlets. A small amount of data is transferred through the Ajax to the corresponding servlet. The response also have lesser content plus only a small processing is required at the server side. Thus it improves the interaction of users with web-applications.

Its time to think ahead of available framework, techniques, and invent new ways to capitalize these techniques.

Your comments are appreciated.


Robin Mulkers said...

I've been blogging about Rich Internet Portals, wondering where they are?
I think there is a fundamental problem when using Ajax and Portals as we know them.
With Ajax, the page is controlled by Javascript running in the browser, this way of working is opposite to Portals where the control of the page is a server-side activity.
Of course, it is possible to consider the use of Ajax in a single portlet but then there are other problems like potential Javascript variable names overlapping or as you mention, performance due to the massive Javascript code reloaded each time, etc etc

vikramark said...


True, Ajax will push the code towards Client side. The first Controlling layer will be more towards client side. But the contents where security is not a major issue moving towards client side can be good, especially when later interactions become so fast.

One need is to answer this potential javascript clashes of names. May be Portlet:namespace should be used everytime a Javascript function is used.

Some technology improvement should be required to use Ajax in a better way. With Stringbeans stating that their new version is going to support reloading of portlets through Ajax, i guess era of Rich Interactive Portals has just begun.