| Contents > Developing ColdFusion MX Applications > Building and Using ColdFusion Components > About ColdFusion components > ColdFusion component features and use CFC invocation and instantiation |
|
|
|
|
||
There are two ways to use a CFC:
Invoke a CFC method transiently if your CFML request uses the CFC only once. Also, if you transiently invoke a CFC method frequently, consider creating a user defined function to replace the CFC method.
Instantiate CFCs to preserve data in the CFC. To ensure processing efficiency if you use the CFC more than once on a page, instantiate the CFC before you invoke its methods.
You can create persistent CFCs by assigning the CFC instance to a persistent scope, such as the Session or Application scope. This way, you can create CFCs for objects, such as shopping carts or logged-in users, that must persist for sessions. You can also create CFCs that provide application-specific data and methods.
ColdFusion provides many ways to instantiate CFCs and invoke CFC methods. For detailed information, see Using ColdFusion components.
|
|
||
| Contents > Developing ColdFusion MX Applications > Building and Using ColdFusion Components > About ColdFusion components > ColdFusion component features and use CFC invocation and instantiation |
|
|
ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting
Version 6.1
Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/buildi10.htm