[Web-SIG] [Fwd: Summer of Code preparation]

Matt Goodall matt at pollenation.net
Wed Apr 19 18:23:39 CEST 2006


Peter Hunt wrote:
> Hi guys,
> 
> I think an interesting project would be complete integration of the
> client and server via AJAX. That is, whenever a DHTML event handler
> needs to be called on the client-side, the document state is serialized
> and it is sent along with the DHTML event information to the server,
> informing it that an event occured. Then, using something similar to
> Nevow's LivePage, it could asynchronously send back JavaScript code to
> update client state based on actions on the server. Ideally, on the
> server-side we'd have a magic document object which is updated with the
> document state every request, and whenever a property is written or a
> method is called, corresponding JavaScript is sent via our LivePage
> mechanism to the client.
> 
> Thoughts?


Invoking something server-side every time there's some (interesting)
event in the browser will almost certainly perform badly due to network
latency and possibly put unnecessary load on the server.

Serializing and sending document state will only make it slower.

A better approach is probably something like Nevow's Athena widget where
there is a server-side Python object "bound" to a client-side JavaScript
object that manages a fragment of the page.

The Python and JavaScript Athena widgets can send messages when
necessary and at whatever granularity is applicable to the application.

- Matt

-- 
     __
    /  \__     Matt Goodall, Pollenation Internet Ltd
    \__/  \    w: http://www.pollenation.net
  __/  \__/    e: matt at pollenation.net
 /  \__/  \    t: +44 (0)113 2252500
 \__/  \__/
 /  \          Any views expressed are my own and do not necessarily
 \__/          reflect the views of my employer.


More information about the Web-SIG mailing list