Forum OpenACS Development: Re: new post-it package

Collapse
8: Re: new post-it package (response to 1)
Posted by Hamilton Chua on
The name "post its" is a bit deceiving. What you're looking to do is sort of like private messaging.

Roel Canicula wrote a private messaging package based on acs-messaging for a client of Solution Grove.

I can dig up the code and send you a copy if you're interested. I beleive this will handle the backend part for you.

But that's only half the battle. Devising a nice UI and how to present it to users is another.

You can do it with Ajax using a concept called "polling". This means that after you load a web page you execute javascript to periodically execute an ajax call to the server to fetch and then display new messages.

However, if you have the luxury of time I would recommend that you look into COMET.

COMET is different from polling because it establishes a persistent connection between the browser and the server.
This is possible with OpenACS thanks to Gustaf's background delivery proc on the server side. On the browser side, you need to implement "page streaming". Gustaf may have already implemented this (and polling too) on his Ajax Chat app inside xowiki.

Examples of real world web apps that use the concept of COMET include Meebo (www.meebo.com) and Gtalk integration with Gmail.

Some resources you might want to look into :
http://ajaxian.com/by/topic/comet/
http://ajaxpatterns.org/HTTP_Streaming

Furthermore, to enhance UI, you might also want to look into
http://prototype-window.xilinus.com/samples.html.

Collapse
9: Re: new post-it package (response to 8)
Posted by Raúl Morales Hidalgo on
Hamilton,

I agree "post it" isn't probably the best name choice but I don't like private messaging either, as private messaging is closer to what Torben posted than to my idea. let's see if we come with a better choice of name, however, it's just the name, as I think the main goals of the package are more or less clear in the above messages.

Comet seems a good idea, if not for the first version of the package, for the second. Thanks a lot for the links, I have started recently digging for ajax info and will surely bookmark those (although the second one's server seems to be down), again thanks ;)

I have also in mind to take a look to Gustaf's work with chat as it is the reference in ajax server-browser communication in OpenACS, I also think both packages will benefit from the other one.

And yes, I will gladly appreciate if you send me the code as it will probably give me more time to focus on UI.

Collapse
10: Re: new post-it package (response to 8)
Posted by Hamilton Chua on
Just for reference, this is the link to the specific forum thread where Gustaf describes streaming with iframes.

https://openacs.org/forums/message-view?message_id=423438

This is also described in a recent article from the Ajaxian Blog

http://ajaxian.com/archives/iframe-script-tags-portable-comet#comments