Does this mean the orientation of the object from cfc?
Achieving this vague "Object Orientation" cfcs is subjective. By making yourself โeverything must be an objectโ, you will force you to do something with CF, which will create additional overhead. I need a little compromise to make sure applications are fast and efficient. Do not worry about achieving some indefinable goal - to be "object oriented." Make a more specific goal, such as reusing cfcs or encapsulating changes. Attempting to pretend objects will not necessarily help you achieve these goals, because each view will be different and probably will not be reused.
Does this mean that the CFML compiler needs to collect the view every time?
Cfms are compiled and cached. I had several large tabbed forms, where each tab is a separate cfm file. At the first boot, they take a couple of seconds to compile and display. On subsequent loads, a tabbed view is generated and displayed instantly. The same thing happens with cfcs.
Is there any good reason NOT to do the cfc file representations themselves? GetContent method?
I back then tried to implement my own training-only infrastructure, and I ended up with the cfinclude approach. From what I remember, I found that it is better to use cfinclude in encapsulated things and avoid the cumbersomeness of creating objects by passing the arguments necessary for the presentation, worrying that the objects are in the right area and avoiding the additional overhead of creating view objects.
In the end, I believe this is one of those things that you should try to figure out yourself which approach is best for your situation.
source share