The answers thus far are great. Generally they way I look at it is
this. CFCs are stateful, meaning they can hold data and persist over
time, udfs are just a place to put commonly used code. For instance if
you have a bunch of time calculation functions could just put them in
a time_finctions.cfm and using them that way as opposed to creating a
time_functions component. I say this becuase generally with time
calculations you want to feed it a time and some other data and it
returns something...you don't need it to maintain a state between
calls. On the other hand if you have a shopping cart where you will do
calculations on say an order...you may put your Order into a CFC. Your
CFC will maintain the order information as well as a suite of
functions that can act upon that information. Hope this simplistic
example helps you apply all the knowledge that you will inevitabley be
given in this thread :)


Adam H 

On Mon, 28 Mar 2005 00:18:55 -0500, David Brown <[EMAIL PROTECTED]> wrote:
> I am new to both of these features, but I am getting the hang of them.  My
> question is: What is the difference between them?
> 
> What are the pro's and cons to each?
> 
> If I create a CFC with a several methods in it is that not the same thing if
> I have one template with the several functions on it?  Is a CFC just a
> collection of UDF's?
> 
> Does CFC use up more memory then UDF's?
> 
> I am looking for best practice I guess.  Sorry for the steam of thought
> email.
> 
> David
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200194
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

Reply via email to