[Top] [All Lists]

Re: application.cfc and UDFs

Subject: Re: application.cfc and UDFs
From: "cf_dev2"
Date: Sat, 4 Aug 2007 03:05:23 +0000 UTC
Newsgroups: macromedia.coldfusion.cfml_general_discussion
>I'd say create a CFC that contains all the UDFs you need. 

 I agree. That's what I suggested earlier.  But personally I would separate the 
udfs by function.  Instead of creating one large cfc, I would create one 
utility class for each category of functions such as: StringUtil.cfc (for 
string functions), DBUtil.cfc (for db functions), etc.  But thats partly a 
personal preference.

 > As for the UDFs that are in cfscript, you can place them into a CFC as-is. 
The only thing I don't like about using functions >written in that manner is 
that without the cffunction tag and cfargument tags, you've got no way to 
restrict what data types >are sent in and what data types are returned.

 I agree with you there too.  Better to rewrite the functions so you can take 
advantage of the benefits introduced with cffunction and cfargument.  

<Prev in Thread] Current Thread [Next in Thread>