[Phpwm] Gmail Talk
sparkes
sparkes at westmids.biz
Tue Feb 21 17:36:52 GMT 2006
On Tue, 21 Feb 2006 09:26:47 -0000 (GMT)
"Iain Wallace" <iain at strawp.net> wrote:
> Can anyone explain, or does anyone have links to articles explaining
> how that works? It's just a bit too cool.
Ajax is a new word to describe something that's been around for a few
years. MS added XMLHttpRequest to ie version 5 and it was included in
Mozilla since 1.0
basically the client requests chunks of data from the server which is
returned using XML. Soap and JSON are often used. The client acts on
this data and then asks for some more.
What you are seeing in the gmail chat (which I haven't checked out yet
so I am basing this on what I expect you to see ;-) ) is the
application server wrapping the jabber chat server and the client
written in javascript. When you write something and send it
XMLHttpRequest is used to send it to the server. When your client
wants to check for new data it sends a small request using
XMLHttpRequest and gets a larger one back. It's possible that the
server then pushes data to you using http multipart as chunks of XML or
JSON which is handled by the client and put on the screen as
required using the DOM.
Nothing new is happening it's just that several little technologies and
the browser support for them all came along at the right time. Like I
said in my rant the other day, it's all cool but don't use it if you
don't need too ;-)
A better example for research if you want to packet sniff the action
would be google suggest because it's going to be far less messy than
google chat/gmail to look at to my eyes it's a better example of a
good ajax client anyway. but, that said, I wouldn't bother looking at
that low a level (unless you enjoy that sort of thing ;-) ) just google
for XMLHttpRequest and read the docs.
It's all really simple it's just that you need to know a little about
lots of different things to make it work and then a lot about usability
and accessability to make it work in the real world. As Darran (whose
name I think I have spelt wrong, sorry Xal) said the other day
gmail is usable on a psp because when all the extra goodies aren't
around it defaults to it's basic html option it's just a case of making
sure that's the case with anything you deploy.
> Cheers,
> Iain
>
>
HTH
sparkes
--
Join the Autistic GNU/Linux User Group http://autisticlug.org
"Science is supposedly the method by which we stand on the shoulders of
those who came before us. In computer science, we all are standing on
each others' feet."-G. Popek.
More information about the Phpwm
mailing list