I've seen quite a few references to how the "private"-ness of the variables scope in CFCs (talking RedSky here) is not quite like Java's private or protected scopes. I am something of a "n00b" (haxor-speak!) when it comes to Java, so would anyone care to compare and contrast the aforementioned scopes in Java and CF? I (and surely others) would be greatful.
In Java, you have public, package, protected and private. These access specifiers are consistent across methods and data and mean, approximately:
* public means anyone can access the method (or data).
* package means any class in the package can access the method (or data).
* protected means any class derived from that class can access the method (or data).
* private means only that class can access the method (or data).
First big difference, CF uses access specifiers for methods but scopes for data.
Second, in CF, data is either part of the unnamed scope (in which case it is similar to protected data in Java) or "this" scope (in which case it is similar to public data in Java).
Third, CF allows methods to be declared with public, package, private and remote access. Of these, public and package correspond roughly to Java's public and package access specifiers but CF's private corresponds to Java's protected and remote means "very public" :) A remote method is a public method that can also be called as a Web Service or via Flash Remoting.
The analogy isn't 100% accurate (because CF is not Java). Note also that Java's access specifiers do not behave quite the same as C++'s, just to add a little more confusion :)
Hope that helps?
Sean A Corfield -- http://www.corfield.org/blog/
"If you're not annoying somebody, you're not really alive." -- Margaret Atwood
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com).
