[Helma-NG] pythonic script scope in firefox

Hannes Wallnoefer hannes at helma.at
Sun May 11 21:45:37 CEST 2008


Hi there and welcome on the helma-ng list.

I just wanted to share an interesting find with you. It looks like it
is actually quite easy to implement compilation unit (or pythonic)
scopes at least in firefox, maybe also in other browsers. The
mechanism is pretty similar to the rhino script I have included in the
wiki page:

http://dev.helma.org/wiki/Modules+and+Scopes+in+Helma+NG/#Implementation

except that you replace the line saying scope.load(script); with an eval call:

   eval(script, scope);

The script itself would be loaded via synchronous XMLHttpRequest,

Now I don't know if there is massive demand for this on the client
side, as it really only starts to get useful when applications reach a
certain level of complexity. And latency issues will surely play a
role, first because it results in the loading of many small files, and
second because this will probably circumvent all kinds of script
caching smarts built in today's browsers.

I still thought this was an interesting find, and I'd really love to
see if somebody could validate this idea with actual code.

hannes


More information about the Helma-NG mailing list