Wednesday, April 9, 2008

ColdFusion components_3

ColdFusion components, also known as CFCs, bring some object-like behavior to ColdFusion.

(For a basic understanding of objects, read "The Nickel Tour of Objects" in Chapter 22.)

In their simplest implementation, components are formal containers for interrelated functions

created by using CFFUNCTION. By encapsulating all functions related to a specific process or

entity in a single component, you take your first step toward thinking in terms of objects

rather than in terms of individual pieces of code.

Components can also be implemented as persistent objects that "live" between page requests

and contain both user-defined functions and properties (data). ColdFusion components are

not true objects, as you find in other languages such as Java or C++, but they do enable some

"object-like" capabilities, such as basic inheritance.

Powerful new functionality in ColdFusion MX, such as Web services and Flash Remoting, use

ColdFusion components as well.

0 comments: