This thread caught my eye and I would like to add a question of my own if I
may. I am relatively new to CFC's and am still getting my head around them.
I have written CFC's that only contain database calls in individual
functions that are all relative to specific areas of my site, so I have a
CFC called matchreport.cfc that handles all select, insert, update & delete
database calls, this is all that the CFC does, is there anything
fundamentally wrong with doing this or is there a better way to handle this?


-----Original Message-----
From: Matthew Walker [mailto:[EMAIL PROTECTED] 
Sent: 21 October 2005 01:46
To: CF-Talk
Subject: RE: CFC - separate or all in one?

> They can be good for both, can't they?  ;^)

Fair enough -- I guess I meant that always using them as a library of
functions is the trap many new users (e.g. me) fall into when first
using CFCs.

You can create utility CFCs that don't maintain state and are
effectively just a collection of related methods. CFCs for manipulating
images are often like this. In JavaScript, the Math class is a good
example. 

I would suggest that as a general guideline, very few of your CFCs
should be written like this. I'd also recommend you keep them in a
separate folder, so you know you don't have to initialise them. 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:4:221789
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to