On Thursday, Sep 11, 2003, at 14:36 US/Pacific, Ian Skinner wrote:
> Generally which is better, a single method with branching logic based 
> on a
> parameter, or separate methods? Or is there no really difference and 
> depends
> on the personal choice and the situation.

It depends. In the example you give where your logic is of the form:

        <cfif {somecondition}>
                {dosomeinitialprocessing}
        </cfif>
        {donormalprocessing}

There's nothing inherently bad in that being in a single method 
although I might be inclined to have both {do...processing} pieces in 
separate (private) methods that are called from the main method.

Of course, you haven't shown us how you are using the CFC and that 
might change my recommendation...

Sean A Corfield -- http://www.corfield.org/blog/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

Reply via email to