>First, what's wrong with setting local variables in Application.cfm?

I don't like the (potential) scoping implications of it... local variables set 
in the application.cfm, particularly for some of the most common variables that 
are set this way (dsn/datasource for instance) are then not available to custom 
tags. Sure you can add <cfset request.dsn = variables.dsn> on the line below, 
but then you're doubling up the code needed to set it, and in the individual 
pages you've got some references to request.dsn and lots of references to #dsn# 
(with no scope). It boils down more to a matter of bad scoping habbits than one 
really of setting variables in the application.cfm, but personally I consider 
it poor practice to set local variables there -- much better to use 
Application.cfm only to set request, cookie and persistent-scope variables. 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208496
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to