CFOBJECT
CFOBJECT instantiates a component and creates a variable for it.
<cfobject type="component" name="path.to.my.CFC" name="myCFC" />
CFINVOKE
CFINVOKE can then reference the variable created by CFOBJECT, so that it doesn't have to re-create the object again.
<cfinvoke component="#myCFC#" method="foo" returnVariable="myValue" />
So you can call as many CFINVOKEs as you want on #myCFC#
without recreating the object.
However, CFINVOKE can also implicitly create the object for you if you don't also use CFOBJECT.
<cfinvoke component="path.to.my.CFC" method="foo" returnVariable="myValue" />
Calling multiple functions in this manner will recreate the object each time.
CREATEOBJECT
createObject()
works pretty much the same way. Either create the object first with a reference variable
<cfscript>
myCFC = createObject("component", "path.to.my.CFC");
myValue = myCFC.foo();
otherValue = myCFC.bar();
</cfscript>
or create the object with each function call.
<cfscript>
myValue = createObject("component", "path.to.my.CFC").foo();
otherValue = createObject("component", "path.to.my.CFC").bar();
</cfscript>
I prefer createObject()
since I've been using CFSCRIPT as much as possible. And I always create the object first if I'm going to call multiple functions from it.