Other frameworks use cfinclude inside of CFCs, so what’s the problem.
In my last post, I gave my insight into the FuseBoxCFC framework that was presented at the frameworks conference.
One of the points that I made was that I and other people didn’t like the fact that it was using the cfinclude tag from within the CFC because of var scoping issues. This got me thinking how other frameworks call the views in an application.
So I download a popular framework to see how it handle this and guess what, it uses cfinclude just like FuseBoxCFC does. Actually what it does is wrap and cfsavecontent around a cfmodule and have the calling template issue the cfinclude. It’s a little wacky but I guess this gets around the var scoping issue.
I guess this means I can’t say anything about FuseBoxCFC using this approach when other frameworks are doing it as well.