Instantiating a CFC

Coldfusion has certainly progressed over the years. As it moves closer to object orientated design, it also becomes more complicated.

One important part of Coldfusion web development for me is the CFC. A CFC is a Coldfusion Component. Essentially similar to a class, the CFC provides a mechanism to store and reuse code. It also, when used properly, facilitates a much more efficient product life cycle.

We have been using CFCs at my work for about a year now, and they are a big hit!  If you are familiar with Coldfusion, you may know that there is more than one way to use a CFC. You can either invoke a function from a CFC using a <cfinvoke> tag, or you can instantiate a CFC for use across a session or application scope.

Though more complicated, instantiation allows for better use of the processing power of your server. This is especially true if you invoke a CFC multiple times throughout the course of a page.

For more on this topic, check out Adobe Livedocs.

Leave a Reply