Ben Forta

Blog

May 25, 2002

Keep Local UDF Variables Local

Variables defined within a User Defined Function are of type VARIABLES. This means that a simple (in a tag based UDF) can overwrite other variables. To keep local variables truly local, use the VAR prefix, as in . This way "name" will persist for the duration of the UDF processing, and will not set...

May 24, 2002

Specify UDF Return Types

User Defined Functions return data, both based UDF's and tag based UDF's. An advantage of tag based UDF's is that they allow UDF return types to be specified. By defining the type in ColdFusion can validate the data returned using . (Applies to: ColdFusion MX)

May 23, 2002

Specify UDF Argument Types

defines arguments in User Defined Functions (as well as ColdFusion Component methods). At minimum defines the arguments and specifies whether or not they are required (optionally specifying default values). In addition, can (and should) be used to specify valid data types so that parameter type...

May 22, 2002

Define UDF Arguments

Tag based user defined functions are created using the tag. The first operation within any tag based UDF should be defining any and all attributes in the order in which they are expected. Each attribute (called an argument) is defined using a tag. (Applies to: ColdFusion MX)

May 21, 2002

Tag Based User Defined Functions

User Defined Functions were introduced in ColdFusion 5 and were written using . ColdFusion MX now provides a tag interface to creating UDF's making it possible to write UDF's that invoke tags and any other code (something not possible using ). (Applies to: ColdFusion MX)

May 20, 2002

Persistent Components

ColdFusion Components can be made to persist by simply placing them in persistent scopes (like APPLICATION or SESSION). Use or CreateObject() to instantiate the component and assign it to a variable, and then refer to it as scope.object. Within the component any data saved in the THIS scope will be...

May 19, 2002

Detailed Component Documentation

To provide greater detail in ColdFusion Components documentation, use the HINT attribute in component tags to provide details and explanations on methods and arguments. ColdFusion will use these hints when generating documentation. (Applies to: ColdFusion MX)

May 18, 2002

Inheriting Components

ColdFusion Components support inheritance, an object feature which facilitates code reuse. In CFC's this is known as "extending" a component, and the EXTENDS attribute is used to provide the name of the component that is being inherited. (Applies to: ColdFusion MX)

May 17, 2002

Documenting Components

ColdFusion Components self document. Simply invoke the CFC without parameters (no query string) in your Web browser, and cleanly formatted detailed HTML documentation will be generated on the fly. (Applies to: ColdFusion MX)

May 16, 2002

Scripting XML Generation

Using ? You can still easily create XML content by using the XMLNew() function which creates an XML object just like the tag. (Applies to: ColdFusion MX)

Page 428 of 489 (4889 posts)