Many people like to use CFInvoke to connect to their object and pass arguments in. However sometimes i believe in the theory that less is more. Being that ColdFusion is now built on a Java platform, ColdFusion has progressively inherited alot of the coding standards into itself. With this has come things like using a ! instead of using NOT, or if you are incrementing a variable for every iteration of a loop you can now use something like <cfset x++> instead of <cfset x = x + 1>. I think these can be cleaner ways and sometimes faster. I digress….

One way that i love to create an object in ColdFusion is by the following:

<cfset variable = createObject('component','NameOfCFC')>

<cfset newvariable = variable.methodiamcalling('argument1=123','argument2=345','argument3=678')>

so now when you reference ‘newVariable’, it will be the information that is returned by the method that was called.

So, if what i am writting is helpful, drop me a line or comment. I would love to hear from you.