On Wednesday, Aug 6, 2003, at 22:19 US/Pacific, Brian LeRoux wrote:
In CFMX 6.1, it is not feasible to cfinclude your method
body. I'm not sure how I feel about that yet.

That should say "it is NOW feasible to cfinclude"... I'm not sure how I feel about such a technique...


But, essentially, all this does is allow us to access a property like
this right??
<cfset foo = myCFCInstance.foo />

Instead of:
<cfset foo = myCFCInstance.getFoo() />

It also allows code to say:


<cfset myCFCInstance.foo = "hahaha i'm bogus data!" />

whereas set / get methods can validate and trap bogus data to maintain the integrity of the object.

Furthermore, using get/set allows you to hide the actual implementation of that property. You can change it (cached, computed, actual) without impacting any client code. That's one of the key benefits of encapsulation and why OO really can help with maintenance issues.

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).

Reply via email to