> the only comment I have is that if you are using components to 
> build object modeled applications, you shouldn't be including 
> files from cfcs.

I don't know what the original poster is using includes for, but I think
there are some really valid reasons to include files into a CFC.
Unfortunately, there are some really monumental problems with CFCs that
make including files problematic (i.e. the argument scope isn't
available or the fact that CFReturn is silently ignored in an included
file).

The reason I originally started experimenting with including files into
CFCs is that, if I included all of the actual logic of a function, it
kept both the CFC file and function files short and sweet. Additionally,
since ColdFusion supports dynamic includes, I reasoned that if I was
working on one function and had a syntax error in my code, it would not
cause other functions of the same CFC to throw an error.

Now, that said, I don't think CFIncludes are a great choice for code
reuse, at least not in an environment that supports custom tags,
CFModule calls, CFCs, etc. Nevertheless, I think there are several valid
reasons for using the CFInclude tag within CFCs. However, current CFC
bugs make it necessary to implement inelegant workarounds.

Benjamin S. Rogers
http://www.c4.net/
v.508.240.0051
f.508.240.0057

______________________________________________________________________
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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to