November 17, 2008

CFC variables.instance

When I saw for the first time, in cfc code, variables.instance = StructNew(), I asked myself "What, what, what?" :) Well, purpose of "subinstancing" of variables structure, is nothing more but teh convenience:
1. It's organized better. All variables of same kind can be grouped in that manner.
2. Easier for cfdump-ing. Do and you'll see what I'm talking about.
3. And it is more obvious what you do: variables.instance.myVar="A" means "I am adding (assigning value to) myVar into instance of variables structure"

Not necessity but can be handy

No comments: