Thanks to this list, Sean Corfield, Ben Forta, Hal Helms and the rest of 
the FB/CF community I'm starting to get my hands dirty using CFC's in my 
FB apps. I'm not sure if the problem below is due to my lack of 
understanding of CFC's or OO in general.  Maybe you can help.

In my fb4.1 circuit file I have something like:

<invoke class="member" methodcall="get(url.memberid)" 
returnVariable="myMember" />

Now, I know I can do:

<instantiate class="member" object="aMember">
<invoke object="aMember" methodcall="get(url.memberid)" 
returnVariable="myMember" />

and this should accomplish the same thing. I also read BF's article on 
using CFC's where he says to initialize the CFC only once and then test 
to see if it was initalized on subsequent method calls.  What I'm 
confused about is if I have to initialize the CFC for each user or only 
once for the 50 concurrent members I may have on my site at one time. 
That is, can I just use instantiate or cfobject in my fusebox.init file, 
create it once, and then do method calls to grab data for any user 
currently on the site or do I have to instantiate a member object for 
each user separately?

I'm trying to avoid using the session scope.  Right now each user has a 
two cookies with their id and login status which I use to mimic a 
session state. Would there be any difference in the way I should handle 
this if I was using the session scope?


Mark Kecko
Technology Director
MediaPost Communications
[EMAIL PROTECTED]
212-204-2002

Sean Corfield wrote:
> On Apr 11, 2005 2:42 PM, Mark Kecko <[EMAIL PROTECTED]> wrote:
> 
>>Ok, that makes perfect sense, doh, and now I have a new error:
> 
> 
> Yeah, I got the syntax slightly wrong.
> 
> 
>><classes>
>>        <class alias="member" type="component"
>>classpath="membermanager.model.member" />
>>        </classes>
> 
> 
> Yes, you need that and then change the <invoke> to refer to the
> *alias* not the component type:
> 
> <invoke class="member" methodcall="get(url.memberid)" returnVariable="member" 
> />
> 
> Sorry 'bout that!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:12:6724
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/12
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:12
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.12
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to