Forum OpenACS Development: Re: ajax based chat as xowiki page

Collapse
Posted by Hamilton Chua on
Coolness !!!!

I don't know if this will help reduce the code in the "content-part" but I put together a little Ajax Helper package that uses the prototype.js and scriptaculous javascript libraries.

It's currently in use in a custom Tag Cloud package in Solutiongrove's Aspen Private Label Communities product and an ongoing project that uses xowiki and portlets.

The package also allows you to use tcl to generate the javscript for cinematic effects like fades and transitions so you can actually put transition effects when the chat screen is updated via ajax.

I was hoping to commit it to OpenACS Head once I've completed the documentation and demos.

Collapse
Posted by Gustaf Neumann on
the "content-part" is currently 25 lines (including the form, url-definitions, etc.) and should be reduced to 10 or so. i am not sure, whether the .js libraries your are mentioning will help with that.

the bigger question is, how many XMLHttpRequests for one browser we want to have more or less in parallel, how to address the multiple instances of one app in browser windows/tabs (names of dom elements), how to bundle/multiplex multiple inquirers in a single HTTPrequests and answer sets. In other words, would not be optimal, if for every ajax application instance, separate XMLHttpRequests whould be created, all of these polling the server for updates. one poll should provide data for all inquirers. registering callbacks in js look like a good idea...

The situation might be different in your situation, i would assume, that once the "cinematic effects" are done (whatever these are) no more requests are needed.

Collapse
Posted by Hamilton Chua on
Hi Gustaf,

These are the same big questions that I dealt with when I was looking into xmlhttpd about 1 year ago when it started gaining momentum. But then things got busy and I was unable to pursue it.

It's a good thing too because between then and now a plethora of javascript libraries and ajax toolkits have been released that address those same questions.

I've just committed to OpenACS CVS Head the Ajax Helper package. Instead of re-inventing the wheel I decided to re-use what is available by utilizing Scriptaculous and the prototype javascript library.

http://cvs.openacs.org/cvs/openacs-4/packages/ajaxhelper/

A demo site will follow very soon.

Cheers,

Hamilton

Collapse
Posted by Rainer Hahnekamp on
Hello Hamilton,

I've tried out your AjaxHelper package and find it is a very useful addition for OpenACS. But I am afraid it produces too much overhead.
If I have for example a page where I only want to use that bubblecallout feature - which should be a very trivial one - the loading time of the page increases from approximately 1 second to over 6 seconds!
Perhaps one can reduce the amount of javascript files that are loaded by default to an absolute minimum.

Greetings,
-Rainer

Collapse
Posted by Hamilton Chua on
Hi Rainer,

Thanks for the feedback.

Hamilton

Collapse
19: ajax helper demo (response to 16)
Posted by Hamilton Chua on
Oh and have you seen the demo ?
It's on a temporary server

http://sgsandbox.com:8002/xowiki/demo

username : mailto:demo@solutiongrove.com
password : demo

Collapse
20: Re: ajax helper demo (response to 19)
Posted by Gustaf Neumann on
wow; this is looks indeed very nice! maybe this is developing to an alternative to the portlets + portal pages...
Collapse
21: Re: ajax helper demo (response to 19)
Posted by Malte Sussdorff on
I seriously hope this develops into an alternative to the way we handle portlets and portals at the moment. I'm missing though a "save" function :).

Furthermore it does not work on Safari.