Dave,

ColdFusion is soooo dynamic that when you talk about things that
"relate" to other languages, it is more in philosophy than practice.
When I say "Constant" I don't mean a value that never changes, I mean a
value that should not be changed by the user. I mean a value that does
not change from instance to instance (basically a static value). Like
wise, when you say a "public" or "private" method - since those can so
easily be hacked - it is only a philosophy, a "suggestion" - a contract
the user makes with the application.

It's all philosophy, don't worry about how things actually port from one
language to another.  


......................
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
 
Need ColdFusion Help?
www.bennadel.com/ask-ben/

-----Original Message-----
From: Dave Watts [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 16, 2006 2:06 PM
To: CF-Talk
Subject: RE: VARIABLES v. THIS in Bean Object

> You have to think about what the two scope need to accomplish. Do you 
> need to "hide" the data? Does data need to be accessible. Many classes

> have constants (ex.
> Paper.A4_LAYOUT). These are clearly not private and would be stored in

> the THIS scope. However, if you want to encapsulate the variables so 
> that people cannot mess with them directly, you might want to put them

> in VARIABLES and have getters/setters.

Since CF doesn't have constants, you have to be careful about making
analogies with languages that do. Constants can't be changed. The
closest thing, functionally speaking, to creating a public constant
within a class in CF is to create a private member variable with a
public accessor.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
 
Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta, Chicago,
Baltimore and Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:260757
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to