>>Dave, Thanks. Is one preferred over the other? Is one more friendly to
understand when reading the code?

Matthew,

I also forgot you could create a custom tag as well. :)

Shannon is right, cfinclude is probably the 'simplest'.  However, you could
start a weeks long discussion on this forum about which is 'preferred' or
'better'.  Bottom line, is - it's your code so do it in the way that you
feel is most supportable in your environment.  I've had managers that didn't
like CFC's at all and wanted everything in includes.  I've had managers that
couldn't stand includes and wanted CFCs.  

There is *at least* one huge advantage of using CFC's over using includes,
and that is that variables are localized to a CFC and cannot be seen, nor
can they alter other variables in your .CFM page.  However, truth be told,
if all you have inside your .CFM is <CFFUNCTIONS> and you use <cfset var> to
define each of your variables inside each function, then, at the very least,
you are not going to 'overwrite' any variables used in your .CFM, however,
it could happen by another programmer that might come along behind you.

I prefer CFCs and think they are simple and easy to use, it's just a matter
of getting used to a new way of calling your functions.

Now, if I *really* wanted to get people going on this forum on this topic, I
would say something like, "You should ALWAYS use CFCs" or "You should NEVER
use CFINCLUDES" but I would never really say anything like that unless it
was just to have some Friday Fun. ;-)

Dave


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309695
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to