If you have a lot of arguments, one way to refactor that is to make a
component that encompasses those arguments - essentially a bean, maybe a
couple of beans if the arguments are unrelated. In your first public method,
instantiate that bean with the arguments, then just pass that bean around.
Follow that, and you've gone from just using components to actual
object-oriented programming.

nathan strutz
[http://www.dopefly.com/] [http://hi.im/nathanstrutz]


On Mon, Mar 7, 2011 at 10:06 AM, Brook Davies <cft...@logiforms.com> wrote:

>
> Hello,
>
>
>
> Just a quick "Best Practices" question. I have a CFC, I call a method and
> pass a slew of arguments to it. Internally it calls a private method using
> argumentCollection=arguments. My question is, should I repeat the argument
> definitions on the private method?
>
>
>
> The arguments are available regardless of whether or not the private method
> has the actual argument definitions. What is the best practice here? Define
> the arguments or just use them knowing they are the same as the public
> method?
>
>
>
> Brook
>
>
>
>
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342806
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to