Thursday, 25 April 2019

WHat is the scope of variable in ColdFusion framework?

There are many types of variable in ColdFusion framework. First it is necessary to understand scope of the variables -

all variables can be local or global.
all variables are persistent or non-persistent.
all variables can be private or public.

The scope of variable defines its properties & values of a variable. There are many different kind of scope in ColdFusion variables -
Caller - to set or read the variable attributes in a scope.

Arguments - to set or read the arguments that are called by the template.

This - to define the storage of the variables

Request - to request for a defined value. It is by default a public variable.

Client - to set the value in the registry or
database.

Cookies - to set the value on the user machine.  

To set a scope for ColdFusion variable is not required. It helps in preventing the confusion to the framework about a variable is being used or not.

Hope you have liked this post ! Thanks for reading this post.

reference links - 

No comments:

Post a Comment