Ajax revised

Hello, w3c!

I want to suggest something that seems to be missing from appformats
plans: AJAX revision. Since all browsers are implementing XmlHTTPRequest
object
anyway, wouldn't it be great to somehow describe this interaction with
HTTP server
without custom client code, but, instead, with some XML language? This
will make web clients
and users less vulnerable (no custom code), so there will be less
security issues.

The interaction can go like this:
1. Some event occurs -- mouse click, mouse move etc. Browser looks
through the table of events,
and if event is handled, asynchronously submits respective form and
continues it's work.

2. Browser receives responce to some event. First, it looks at the type
of responce:
whether it is "change" responce, which describes some changes to the
page, or 
"complete" responce. If the responce is of type "complete", browser
renders new page 
(i.e. it works old way). Now, the interesting part is "change" responce.
If browser receives this kind
of responce, it just renders received changes to the page.

First thing we need is some language for event-table specification. It
can be something like this:

<event id="register">

<form-ref id="name_form" />
<form-ref id="details_form" />

</event>

If this event occurs, two forms are submitted: name_form and
details_form.

Than, somewhere in the document:

<span... >
Hello, 
<slot  event-ref="register">
Unknown user!
 </slot>
</span>

If we receive some "change"  type responce from the server, which can be
a document,
containing some XSLT, like this:

<xsl:stylesheet ...>
<xsl:template match="/text()">
<xsl:text>Maxim Sloyko</xsl:text>
</xsl:template>
</xsl:stylesheet>

So browser sees, that this responce is a responce for event
"register" (somewhere in the header
maybe) and looks for the slot for this event in document. Than applies
XSLT transformations,
as if <slot...> element is the root element.

Actually, "event" element may be redundant, because <xform> can take its
place, but overall process
remains the same.


Currently I'm trying to implement this interaction scheme in my example
application,
 however it is not complete yet.

It would be great if you can give some feedback on this topic!

Thanks for your attention!

--
Maxim Sloyko
SWsoft Inc.(http://www.swsoft.com), Developer

Received on Tuesday, 31 January 2006 05:02:17 UTC