[Javascript] Isolation of code

David T. Lovering dlovering at gazos.com
Fri Apr 11 09:56:02 CDT 2003


I was wondering if there was a "clean" way of embedding multiple PHP modules or other server-side
code constructs within a single HTML document without having to worry about fall-through execution.
I've now whipped the callable external routine issues (without requiring remotes), but I'd like to
cut down on gazillions of little external PHP, ASP, or whatever routines that ride around with the
app web page(s).

Yes, I am familiar with the use of libraries (and often use them), but the downside is that everything
in the library gets hauled in at the same time, irrespective of the need for it.  Pulling everything
by reference instead of by inclusion cuts down on executable code bulk, but ups the execution latency
something fierce.  I'm also a bit queasy about building a whole bunch of separate libraries having
just the right routines for each app, and then keeping them straight and managing the revision control
issues.

I've explored using embedded hash tags within spans as wrappers, but so far there's no joy in Mudville.
Any notions?  It is virtually certain that someone has tackled this before, even if only in the context
of "plain" HTML modules which are included inline, but only invoked as required.

-- Dave Lovering


More information about the Javascript mailing list