Do you know that you can name your arguments in the compenent.method(arg2=1,
arg1=2)?

-----Original Message-----
From: Matthew Drayer

We started off writing all our component method calls inline -- ie:
component.method(argument1, argument2), but we quickly found that

1. It was sometimes hard to follow what was going on due to the squished up
nature of the code.

2. Having to maintain the proper order of argument declaration was a pain in
the neck.

So, we switched over to using <cfinvoke> for almost all of our method calls.
It lends a little flexibility to the developer, and helps to make the code
self-documenting.

We do still have some component method calls done the inline way, but they
are typically argument-less methods used in <cfif> tags, etc.:

<cfif server.hcpro.isCustomerSubscribed()>
  DO STUFF
</cfif>

Matt





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:185587
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to