A third option would be to have an app_constants.cfm file that every CFC includes in the psuedo-constructor area. An object that contains constants is kind of a kludge in my opinion (though one that I've definitely used, and do so to this day ;) ). This is somewhat analogous to an static import in Java, and feels a bit better to me. This approach also allows you to simply dereference the constants directly without needing to scope them onto whatever object contains them.
cheers, barneyb On Tue, Nov 25, 2008 at 9:02 PM, Kevan Stannard <[EMAIL PROTECTED]> wrote: > > Currently we have our constants stored in a singleton > ApplicationConstants object that is injected explicitly into whatever > objects need it. A co-worker has suggested creating a base object that > all other objects inherit from that has setConstants()/getConstants() > functions, and injecting the constants object automatically into every > object. Because of the global nature of constants this is sounding > like a fair use of a base application object. What do you think? > > > > > -- Barney Boisvert [EMAIL PROTECTED] http://www.barneyb.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CFCDev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfcdev?hl=en -~----------~----~----~----~------~----~------~--~---
