Yep, January meeting is on 1/11 and we'll be talking about open source
projects in the ColdFusion world.
As for CFCs, basically what I'm saying is if you do the following,
you're going to be creating and destroying your object every time,
which is really inefficient:
<cfinvoke component="MyCFC" method="getSomeStuff" returnvariable="someStuff" />
<cfinvoke component="MyCFC" method="getSomeOtherStuff"
returnvariable="someOtherStuff" />
What that does is create, call, destroy, then create, call, destroy
again, which has unnecessary overhead associated with it. If you're
going to use an object a few times, you want to instantiate the object
using CreateObject or cfobject, then call the methods:
<cfset myObject = CreateObject("component", "MyCFC") />
<cfset someStuff = myObject.getSomeStuff() />
<cfset someOtherStuff = myObject.getSomeOtherStuff() />
Because you only create the object once, there's less overhead
involved, although once you create it it takes up memory of course.
You have to adjust any of this stuff to your particular situation.
Let me know if that didn't answer your question.
Matt
On Wed, 15 Dec 2004 15:45:28 -0600, Chris Gomez <[EMAIL PROTECTED]> wrote:
> ok, you're getting way over my head. can you give me an example of how
> to do this?
>
> oh, yeah. is there a January meeting?
>
>
> On Wed, 15 Dec 2004 14:48:01 -0600, Matt Woodward <[EMAIL PROTECTED]> wrote:
> > One thing to bear in mind--if you're using cfinvoke, unless you're
> > calling it against an object that's already been created, cfinovke
> > creates the object, calls the method, and then destroys the object, so
> > if you're going to call more than one method on an object you aren't
> > going to want to do that using cfinvoke. You're better off creating
> > the object using cfobject or CreateObject() and then calling the
> > methods against the instance of the object.
> >
> > Matt
> >
> > On Wed, 15 Dec 2004 13:25:58 -0600, Phillip Holmes
> > <[EMAIL PROTECTED]> wrote:
> > >
> > > >what do I do with the cfinvoke and cfinvokeargument?
> > >
> > > Trash those nasty tags. I don't use them. The code I posted replace those
> > > tags. Once you call your object, your methods therein will be available
> > > without calling the object again.
> > >
> > > Example:
> > >
> > > <cfscript>
> > >
> > > myobj = CreateObject('component','mycomponent');
> > > // after your opbject in instantiated, you can call any function contained
> > > in your object without calling the component again.
> > > myobj.mymethod1();
> > > myobj.mymethod2();
> > > myobj.mymethod3();
> > > myobj.mymethod4();
> > >
> > > </cfscript>
> > >
> > > Regards,
> > >
> > > Phil
> > >
> > >
> > > ---
> > > [This E-mail has been scanned for viruses.]
> > >
> > > ----------------------------------------------------------
> > > To post, send email to [EMAIL PROTECTED]
> > > To unsubscribe:
> > > http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
> > > To subscribe:
> > > http://www.dfwcfug.org/form_MemberRegistration.cfm
> > >
> > >
> >
> > --
> > Matt Woodward
> > [EMAIL PROTECTED]
> > http://www.mattwoodward.com
> > ----------------------------------------------------------
> > To post, send email to [EMAIL PROTECTED]
> > To unsubscribe:
> > http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
> > To subscribe:
> > http://www.dfwcfug.org/form_MemberRegistration.cfm
> >
> >
> ----------------------------------------------------------
> To post, send email to [EMAIL PROTECTED]
> To unsubscribe:
> http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
> To subscribe:
> http://www.dfwcfug.org/form_MemberRegistration.cfm
>
>
--
Matt Woodward
[EMAIL PROTECTED]
http://www.mattwoodward.com
----------------------------------------------------------
To post, send email to [EMAIL PROTECTED]
To unsubscribe:
http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:
http://www.dfwcfug.org/form_MemberRegistration.cfm