Are there any benefits of one over the other? Are there any performance issues to consider?
Andy McShane Head of Development Scout7 Ltd, 324a Lichfield Road, Mere Green, Sutton Coldfield West Midlands United Kingdom B74 2UW Telephone: +44 (0)121 323 2640 Mobile : 07866 430783 Fax: +44 (0)121 323 2010 Email: mailto:[EMAIL PROTECTED] Website: www.scout7.com -----Original Message----- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: 29 November 2004 18:29 To: CF-Talk Subject: Re: Best way to access CFC's? CFINVOKE and createObject are very different beasts. CFOBJECT and createObject are the same, but CFINVOKE creates and instance of the CFC, calls the specified method on it, and then lets the instance disappear, with no hope of holding on to it for future reuse. Here's two examples of creating an object instance: <cfset i = createObject("component", "test") /> <cfobject action="create" type="component" name="i" class="test" /> And here's two examples of calling a method on a CFC, without creating an instance: <cfset r = createObject("component", "test").testMethod() /> <cfinvoke component="test" method="testMethod" returnvariable="r" /> cheers, barneyb ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:185639 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