I don't see how using structures over arrays improves encapulation. Granted standardising the naming of the resultsets will help but how can it be better in having to know the names of two variables inside another function/cfc method?
Good call on the value/reference point though, that always slips me by. Ade -----Original Message----- From: Sean Corfield [mailto:[EMAIL PROTECTED] Sent: 03 March 2005 20:19 To: CF-Talk Subject: Re: Stored Procedures in a CFC On Thu, 3 Mar 2005 13:54:45 -0000, Adrian Lynch <[EMAIL PROTECTED]> wrote: > I use structures to pass back multiple things from functions, but I'm not so > sure you're right about not using an array. An array maps to the > cfprocresult's resultset attribute(as it could equally to it's name attrib) > but with the array you don't need to know the name used only the number of > the resultset. But returning an array causes the array to be *copied* (not a huge deal with only two entries but still...). An array doesn't give you nice names - it effectively requires calling code to know which order the two entries are in. It's much better from a maintenance point of view to use a struct with well-named keys. That way if you change the implementation of the CFC method, you can still return the two queries even if you move away from a SP with two result sets... (so the struct is better encapsulation because it hides the SP implementation). -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.6.0 - Release Date: 02/03/2005 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:197329 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

