Mark Stanton wrote:
Well I kinda disagree. Application scope is where application constants should be kept. If you only have the odd constant request is fine. But what if your contants include more complex variable types?? like arrays, structures, query objects?? Even a simple string variable assignment takes time if its done every time the page is run.then wouldn't it be smarter to just have <cfset DataSource = "dbname"> in application.cfmWe generally use request.dbname or similar. The only advantage of this is that it is a bit more persistent than an unscoped variable.But yes setting global variables in the application.cfm (or some file called from it) into some scope OTHER THAN session or application is good where ever possible.
Obviously you have to wrap your application scope assignment in some sort of logic that means its only run once per application initialisation.
-- geoff
http://www.daemon.com.au/
---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/
