Jay Gibb wrote:
<!--- option 4 --->
<cfinvoke method="getCustomer"
component="customerController"
returnVariable="customerStruct">
<cfinvokeargument name="customerId" value="#checkCustomer.customerID#"/>
</cfinvoke>
> So, what it boils down to for me, is options 2 and 3. 1 and 4 are good to
know about,
> and they're handy from time to time, but generally they should be avoided
unless you've
> got a really good reason to use them.
My personal "good reason" to use option 4 over option 3, with or without a
prior <cfobject> calls (as required by context), is that despite its
verbosity, option 4 clearly distinguishes between attributes of the
<cfinvoke> tag and arguments of the method being invoked, while option 3
munges all this together in a single tag. To my mind, distinct arguments
increase readability, as does consistent use of either the tag-based or
<cfscript> coding idioms (not both) within any given compilation unit
(template or component).
As a bonus, DWMX auto-generates option 4 styled code from a Components panel
method drag'n'drop, so the additional verbosity doesn't cost me any time.
My .02,
Leo
----------------------------------------------------------
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).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]