Hiya, We have a bunch of fairly amateurishly written CFCs (yes guilty) that access a few global environment variables in the request scope (say for example datasource name and a few similar). Now I'm trying to address this and finding I have a few options....
0) Access environment variables in the request scope directly from the CFC method. This is the technique I'm undoing, hence option 0. 1) pass each environment variable into each CFC method as required. I think this is an ugly inelegant solution although conceptually the simplest. 2) Create an object containing all the environment variables with accessor and mutator methods as appropriate and pass in this object when initializing any CFC. This is the option I'm in favour of. 3) Have each CFC extend a CFC that can access these environment variables. I am uncomfortable with this as it seems like the name space of the CFC is going to be rather crowded with methods -- there'd be getSomethingVerySpecificToThisObject() alongside getSomeAppSetting() which seems disorganized. Other options? No doubt. This must be a very common, very fundamental problem. What do other folks do? ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com).