Along with many others, I am finally making my journey through the
"Object Safari" and after much too long I am finally beginning to get
it. The proverbial light is blinking and I am starting to see the
forest. For a while I was trying to look at the forest from the trees,
but I didn't know that I was in the trees.

Now that I am a little more ready to start looking at the trees, two
sets of code examples I am looking at are causing me to wonder if I
should use the VARIABLES scope or the THIS scope in my bean objects.

Here are two different methods which illustrate it:

        <cffunction name="setId" access="public" output="false" 
returntype="void"
                        hint="Sets this person's ID">
                <cfargument name="id" type="string" required="true" />
                <cfset variables.id = arguments.id />
        </cffunction>

        <cffunction name="setid" access="public" output="false">
                <cfargument name="id" required="yes">
                <cfset this.id= arguments.id/>
        </cffunction>

Just a quick note: The accessor method using the VARIABLES scope is an
actual bean object while the accessor method using the THIS scope is
an uber-object that also contains CRUD and other Gateway methods. I'm
not sure if that is influenced the choice to use THIS over VARIABLES
or not...

Thanks for all of the help,
Aaron

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:260694
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to