Title: Message
You can try using an "application" scoped variable... but community opinion (which is always right ... correct, so we jump to another community if to become right... anyway) community opinion is that encasulation would keep a CFC ignorant about it's environment. It only knows what you tell it. So, you should pass the information into the cfc... or tell the cfc where to look the information up at least. (like in an include file.)
 
The only time this becomes an issue is with Web Services or Flash Remoting. Then you are calling the CFCs externally, and then you may want to use the Application.cfm file for declaration, but the include file leans more towards the concept of encapsulation. (Also, if you are on linux... don't know if this is still an issue, but the Application.cfm required a capital 'A' according to older docs. Don't have a linux server running CF... can't tell you. That could cause someone to not get the Application.cfm file to be called though, if it wasn't case correct.)
 
John Farrar
----- Original Message -----
From: Tony Weeg
Sent: Tuesday, September 16, 2003 11:12 AM
Subject: [CFCDev] application.cfm and cfc's

yah!
i understand.
 
now, does the Application.cfm file get processed before cfc's get processed.
 
i have application.cfm with my site wide dsn's established in there.
i reference said dsn variable, and its spitting up, saying its not defined?
 
weird.

tony weeg
sr. web applications architect
navtrak, inc.
[EMAIL PROTECTED]
www.navtrak.net
office 410.548.2337
fax 410.860.2337

Reply via email to