[thelist] Application Vars in ASP

David.Cantrell at Gunter.AF.mil David.Cantrell at Gunter.AF.mil
Thu Feb 13 09:26:26 CST 2003


>What are the implications of this many Application Vars?
>Would I be better off changing all the app vars to normal vars and stick
>them in an include file on every page?

Each time a user connects to the site an Application instance object is
created and populated with everything added in the global.asa. I personally
wouldn't want a massive object floating around my application, but hey,
there's always reasons people may want exactly that.

>Is it worth putting functions in the global.asa?
>what are the implications of this?

One thing it would do is eliminate include clutter. A major problem with
includes (with VBScript anyway) is namespace collisions, where you have a
variable declared in two separate scripts at the same level (i.e. global
within the script). Once you tie them together with includes, the system
dies a horrible gut-wrenching death because VBScript can't deal with
re-declaring variables. This applies to functions, subs, classes, etc.
Basically anything you can "name". If it's not in a function or a sub or a
class (or a property within a class), it's global.

Check MSDN for more info, they probably have good articles there.

HTH,
-dave



More information about the thelist mailing list