I guess my point was that I am explicitly disallow considering the datasource to be a property of the gateway object. It's an implementation detail that the gateway object doesn't claim to know anything about.
If you wanted to use a setter (which is probably reasonable), you can do that and make it a private method so that people can't use it. You maintain the abstracted setting of the variable, but also retain the datasource's status as non-property, since no one except the CFC itself can do anything with it. However, if you do that, then you'll want to use getDatasource() in all your CFQUERY tags, rather than the raw variable, and to me, that's a foolish waste of resources, and the main reason I don't do it that way. cheers, barneyb On 9/9/05, Jason Davey <[EMAIL PROTECTED]> wrote: > Barney: Thank you for confirming my thoughts. > > I prefer the getter / setter methods so that I can optionally and > deliberately break OO patterns where I want to embed logic in the setter > method that is more than just <cfset variables.dsn = arguments.dsn>. See my > previous post for an example. > > In fact, as far as syntax goes, I like this in my init() method: > > <cfscript> > setDataSource(); > return THIS; > </cfscript> > > Jason D. > -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 100 invites. ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). CFCDev is supported by New Atlanta, makers of BlueDragon http://www.newatlanta.com/products/bluedragon/index.cfm An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
