You can still create a UDF using CFFUNCTION. You're always going to find
a use for UDFs, cause even in C++ not *everything* makes sense to have
as an object.

One key feature to the CFFUNCTION is it allows you to create some UDFs
you could never create before. For example, you can now create a UDF
that uses the <CFWDDX> tag (for that matter any other tag that didn't
have a CFSCRIPT compatible syntax.)

As for which is better, a CFC or a UDF--it depends. CFCs give you many
advantages over just creating a UDF, but that may not always mean a CFC
is the most appropriate architectural choice. There are times when using
an oo-based approach to solve a task may be extreme overkill, and
writing a straight UDF makes much more sense.

For example, if I just need a function to calculate a value based upon a
list, a UDF seems to make more sense than trying to create an object for
the one functionality. However, if that list of values relates to some
object and there's lots of manipulation required to that same set of
data, then creating a re-usable component makes a lot of sense (since
you can then use oo-based principles, by creating an instance of that
data, which you can manipulate.)

In a nutshell, I don't think UDFs are going anywhere and CFCs don't
necessarily replace them.

-Dan

> -----Original Message-----
> From: Joshua Miller [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 23, 2002 12:52 PM
> To: CF-Talk
> Subject: CFMX - Function Best Practice ?
> 
> Hello,
> 
> I'm a little confused with all the new CFFUNCTION ability in CFMX - I
> know it's more extensible than UDFs as it can be used for WebServices,
> etc., but what is the best practice for creating functions? Are UDF
> functions going by the wayside after such a short lifespan or do they
> serve two seperate purposes now? Is it best to use CFC or UDF when not
> needing remote consumption or access? Is there a processing difference
> between the two?
> 
> Thanks,
> 
> Joshua Miller
> Web Development :: Programming
> Eagle Web Development LLC
> www.eaglewd.com <http://www.eaglewd.com/>
> [EMAIL PROTECTED]
> (304) 622-5676 (Clarksburg Office)
> (304) 456-4942 (Home Office)
> 
> 
> 
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to