I am trying to get into Mach-ii and just read Ben Edwards' article about using Beans. I have been using for some time a method of data encapsulation that relies on implicit arguments. In my CFC I declare an instance struct within the variables scope - nothing new there. Then I have two functions, get(string varName) and set(string varName, string varValue) which search the instance scope for the variable requested. If it does not exist, get returns an empty string, while set creates the variable and assigns it the given value. This has worked well for rapid application development (I am the only CF/database developer at my company, so I develop application code alongside developing database schemas.) but I know it's not really a best practice. My question is, what is the general consensus concerning the use of beans, with their strict rules of getters and setters, and what are people's thoughts on my method? It has definitely saved me time, with only a few small caveats (dealing with undefined numeric values, for example.)

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email.


CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to