[whatwg] Some likeness of DOM Session scope

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