The Application.cfc's THIS and VARIABLES scopes
So traditionally the THIS scope stores variables that are used outside the component, and the VARIABLES stores, well, variables, that are private to the component, right?
I ask, because in my application.cfc's BIFs (like onApplicationStart(), onRequestStart(), etc.), I make calls to other components, and there are some values that are initially stored in the application.cfc that need to be shared with these components (but I was told that I shouldn't just make these components inherit from the application.cfc)
What I *WAS* doing was calling these component methods and passing the variables I *WAS* storing in the VARIABLES scope like the following:
<cfset componentObject.methodName(
firstArg = VARIABLES.var1,
secondArg = VARIABLES.var2
) />
Thing is that I've found, these variables are needed rather often by a lot of functions throughout the application.cfc. Should I be storing these common values in the THIS scope instead? Someone told me that it's sloppy to just send the entire THIS/VARIABLES structure as an argument that is not even defined in the function being called.
