>I so laugh at this statement
>
>And I quote
>
>"Although putting data in the this scope is perfectly valid 
>and will not
>cause any errors, it generally isn't seen as a good idea. The 
>main reason
>being that you lose the ability to tightly control that data 
>from within the
>CFC, so breaking the encapsulation. That leads to increased 
>overhead when
>you try to maintain the code, because you can't just look at what's
>happening inside the CFC before making changes. You have to 
>also look at
>where it is used and how it is used to make sure none of the 
>data in the
>this scope is being added, modified or removed by external code."
>
>Then if you treat them as properties, then what is your problem:-)
>
>This is how OOP works in Java and .Net and should be the way developers
>treat them in coldfusion! As properties, then you would know 
>that there is
>an external influence. Even if you had a get/set method then 
>you would have
>the same problem, treat them as properties and you will not go wrong.

I guess I'll just have to disagree with you on that.

I would not recommend working with publicly writable properties in .NET for
the same reasons I explained in my email.

I assume you're referring to fields in java rather than
java.util.Properties. In which case they are almost always defined as
protected (the default accessibility) which means that anything changing
them will have to be in the same package. That limits the impact of any
potential problems, but I generally make them private and create getters and
setters where necessary in any case.

Working with read only properties and fields is another story entirely, but
that's not possible in ColdFusion unless you accept the overhead of using
getMetaData() and use the cfproperty tag to declare static variables.

>
>Taco if your reading this, I suggest reading on how classes 
>are used in Java
>and follow there guides on how they do it and apply these rules to your
>framework and what best suits you.
>
> 
>Regards
>Andrew Scott
>Technical Consultant
>
>NuSphere Pty Ltd
>Level 2/33 Bank Street
>South Melbourne, Victoria, 3205
>
>Phone: 03 9686 0485  -  Fax: 03 9699 7976
>
>
>
>---
>You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
>To unsubscribe send a blank email to 
>[EMAIL PROTECTED]
>Aussie Macromedia Developers: http://lists.daemon.com.au/


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to