Connecting Tech Pros Worldwide Forums | Help | Site Map

which one i can use cfinvoke /cfobject

Newbie
 
Join Date: Dec 2008
Posts: 29
#1: Feb 11 '09
Hi,
one doubt regarding cfinvoke /cfobject

i have one cfc with more than 2 function called comp1.cfc
i have another cfc with more than 2 function called comp2.cfc

in the 2nd one (comp2.cfc) use one same function in comp1.cfc.
which way is better CFINVOKE or Createobject for tht componet?
why?

acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#2: Feb 11 '09

re: which one i can use cfinvoke /cfobject


cfobject creates an instance of a component while cfinvoke runs a method in a component. Which one you use depends on whether you plan to use more methods within that component. See this link for a discussion.
Reply