Technically, they both will work.

However, what if you have a different process of calling the same
function that doesn't use the form scope?

What if you want to call the same method as a web service?

Your current system will fail at that time.

<realitycheck>
Of course, if you fully control your code and no one else will ever use
it, then do what you think works best for you.

I have some code that might not pass the approval of several people, but
it works for me and I can understand it.

If your code is not being compared to others, nor are you being judged
as part of your compensation, it really doesn't matter.

However, at some point, you will find that following these accepted
principals will become beneficial.  That is when it "clicks" and you see
the light.
</realitycheck>

-----Original Message-----
From: Rick Faircloth [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 22, 2008 10:15 AM
To: cf-talk
Subject: Re: How can this CFC be improved?

Thanks for the feedback, Mike.

 > Even though it works, it is not a normal practice for the guts of a
> component to know what is going on outside.

What's the difference, ultimately, in referring to the form variables in
<cfset myObj.update_product(form, product_id)> and just referring to
them directly in the query?

Either way, they're still just methods of "informing" the method of the
data "on the outside", right???

It just seems like two different ways of doing the same thing...

Rick

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314232
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