W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2005

[whatwg] Some likeness of DOM Session scope

From: Dimitri Glazkov <dimitri.glazkov@gmail.com>
Date: Thu, 21 Apr 2005 07:26:01 -0500
Message-ID: <fb15ac210504210526262c6bc@mail.gmail.com>
IMHO, one of the biggest obstacles for growth in Web applications
development is the fact that the entire application lives in the scope
of one request.

Once next request is made, the browser essentially "forgets"
everything and the whole new cycle of loading, initialization, and
binding begins.

Yes, you can simulate the effect of retaining scope across several
requests with XmlHttpRequest and even frames, but it's the "simulate"
part that bothers me. "Simulate" means "hacking", and "hacking"
inevitably means inconsistent and/or incomplete implementations.

It seems that a future Web Application platform should have this type
of functionality readily available. What do you think about the idea
of having some likeness of a scope that's inherently wider than
request?

Consider this example (improvising here):

Request 1:

function SyntaxHighlighter()
{
// code goes here to provide on-the-fly beautification of code
}
document.session.highlighter = new SyntaxHighlighter();

Request 2+:

if (document.session.highighter)
{
var codeSections = document.getElementsBySelector("pre > code")
for(var i = 0; i < codeSections.length; i++)
{
SyntaxHighlighter.apply(codeSections[i]);
}
}

Is this a totally asinine idea?

:DG<
Received on Thursday, 21 April 2005 05:26:01 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:22 UTC