Collaboration through XMLHttpRequest?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Collaboration through XMLHttpRequest?

Cees De Groot
I've been asked to show a quick proof-of-concept where a user gives up
filling in forms, presses the 'call me' button, gets called back by
the call-center agent, and both parties get essentially the same form
so they can cooperate on completing it. My idea is to use
XMLHttpRequest polling to synchronise both forms.

I don't see any big technical hurdles (certainly not for a
proof-of-concept ;-)), but if someone has done something like this or
knows some Javascript code that helps here, I would greatly appreciate
any help that can get me quicker to the demo...

Reply | Threaded
Open this post in threaded view
|

Re: Collaboration through XMLHttpRequest?

Edgar J. De Cleene
Cees De Groot puso en su mail :

> I've been asked to show a quick proof-of-concept where a user gives up
> filling in forms, presses the 'call me' button, gets called back by
> the call-center agent, and both parties get essentially the same form
> so they can cooperate on completing it. My idea is to use
> XMLHttpRequest polling to synchronise both forms.
>
> I don't see any big technical hurdles (certainly not for a
> proof-of-concept ;-)), but if someone has done something like this or
> knows some Javascript code that helps here, I would greatly appreciate
> any help that can get me quicker to the demo...
I'm very interest on this.
Say me what to do or send private mail if you think is better.

edgar



       

       
               
___________________________________________________________
1GB gratis, Antivirus y Antispam
Correo Yahoo!, el mejor correo web del mundo
http://correo.yahoo.com.ar 


Reply | Threaded
Open this post in threaded view
|

Re: Collaboration through XMLHttpRequest?

Janko Mivšek
In reply to this post by Cees De Groot
Hi Cees,

I strongly recommend you to use XMLHttpRequest indirectly through
prototype.js library http://prototype.conio.net/, see also a nice
tutorial here: http://www.sergiopereira.com/articles/prototype.js.html.

Most useful Prototype functions are: Ajax.Request and Ajax.Updater.

With Ajax.Updater you can send a form to server, get new form back and
update/replace old form element.

I hope this help you a bit ..
Janko


Cees De Groot wrote:

> I've been asked to show a quick proof-of-concept where a user gives up
> filling in forms, presses the 'call me' button, gets called back by
> the call-center agent, and both parties get essentially the same form
> so they can cooperate on completing it. My idea is to use
> XMLHttpRequest polling to synchronise both forms.
>
> I don't see any big technical hurdles (certainly not for a
> proof-of-concept ;-)), but if someone has done something like this or
> knows some Javascript code that helps here, I would greatly appreciate
> any help that can get me quicker to the demo...
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Collaboration through XMLHttpRequest?

Cees De Groot
On 1/13/06, Janko Mivšek <[hidden email]> wrote:
> I strongly recommend you to use XMLHttpRequest indirectly through
> prototype.js library

Yup. The first thing I loaded after Seaside was Scriptaculous :-)

> With Ajax.Updater you can send a form to server, get new form back and
> update/replace old form element.

I currently use the SeasideAsync #liveCallback: to update the
in-server model on every keystroke. So now I'll see how to use
Prototype to build a simple polling loop to update the webbrowser
display from the in-server model...


Reply | Threaded
Open this post in threaded view
|

Re: Collaboration through XMLHttpRequest?

Janko Mivšek
Cees De Groot wrote:
> On 1/13/06, Janko Mivšek <[hidden email]> wrote:
>
>>I strongly recommend you to use XMLHttpRequest indirectly through
>>prototype.js library
>
> Yup. The first thing I loaded after Seaside was Scriptaculous :-)
>
FYI: you don't need full Scriptaculous (>100K additional Javascript),
just Prototype library.
>
>>With Ajax.Updater you can send a form to server, get new form back and
>>update/replace old form element.
>
> I currently use the SeasideAsync #liveCallback: to update the
> in-server model on every keystroke. So now I'll see how to use
> Prototype to build a simple polling loop to update the webbrowser
> display from the in-server model...
>
I forgot to mention Ajax.PeriodicUpdater, which can be helpful too.

But for a while I'm playing with an idea, how to update part of web page
exactly when it's contents change. Currently we need to poll server to
check for a change.

Idea is to delay server's answer to Ajax.Updater until the content
actually changes on the server. Client would send Ajax request but
server would wait until there is something new to return back.

That way we can achieve something similar to a MVC change notification
from model back to UI as we are used on GUI apps.

JAnko


Reply | Threaded
Open this post in threaded view
|

Re: Collaboration through XMLHttpRequest?

Cees De Groot
On 1/13/06, Janko Mivšek <[hidden email]> wrote:
> FYI: you don't need full Scriptaculous (>100K additional Javascript),
> just Prototype library.

I know. But it's a proof-of-concept, and the quickest way to get
Prototype is just to load the Scriptaculous package from the Seaside
repository.

> Idea is to delay server's answer to Ajax.Updater until the content
> actually changes on the server. Client would send Ajax request but
> server would wait until there is something new to return back.

Yup. A pity that the idea doesn't seem to work due to locking issues.
The Prototype (or SeasideAsync for that matter - I've started with
that) asynchronous calls land in the same session as the "main" calls,
and only one call can be active in Seaside at any given time. I'll
probably load HV2 to take care of the asynchronous stuff because I
don't want to poll, that gives rise to all sorts of issues.

But apart from that issue, e.g. when polling, I've shown the customer
that the principle works, so I can invest some more time in setting up
something really good :)