[whatwg] Some likeness of DOM Session scope

Dimitri Glazkov dimitri.glazkov at gmail.com
Thu Apr 21 05:26:01 PDT 2005


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<



More information about the whatwg mailing list