I'm no OO expert. I only come at it from CF. So, I can't answer your last question. As to your first question, yes, you'd call the insertNews _after_ you have created the userid. If you do what another person suggested, though, you can actually create the userid (as a UUID) when you create the user component instance.
I also can't tell you which is the way to go in this case, because I don't know what else you're trying to accomplish. If the only thing you need the newsletter cfc for in the user component, then it probably makes sense to just call an invoke. If you need it for other stuff, you could want to instantiate. For instance, if a user object persists across the whole session, and your rule is that users have newsletters, then I'd instantiate and have methods like, "getNewsletterList()" or whatever you need to actually display the user's newsletters and such. On 2/13/06, Aaron Roberson <[EMAIL PROTECTED]> wrote: > > Deanna, > > Thank you very much. Wether or not I invoke or instantiate, am I > correct in assuming that I should pass the userID to the newsmanager > after inserting the user into the users table? Otherwise, the db may > not let me insert the userID in the linking table without a > corresponding userID in the users table. > > Another thing: In this scenario, should I instantiate an object of the > newsmanager component? I have been reading in my Java book that there > is a difference between a method class and a method instance. A method > class, as you probably know, is not an instance. Does this apply to > CFC's in CFML? > > Thanks again, > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232150 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

