So, I'm just starting to go into OO-style CF development and I have a quick
theory question... Mind you, this is brand new to me, so be gentle.

When setting up my Location Bean, I started to go through each of the
individual variables and created a get() and set() method for each of them.
I got about halfway through and decided that I was tired of creating
repetitive functions. I thought to myself, why can't I just create simple,
dynamic get() and set() functions to handle all of these variables
dynamically?

Rather than setName(value), why not setVar("Name",value)?

Since these methods are inherently dumb (nothing but a cfset and a cfreturn
as I've seen implemented), why does it matter that I have an individual
method for each? Validation would come in an additional business layer
anyway. 

I guess I'm looking for pros/cons. This seems like a more dynamic, elegant
way to set/get, but I'd like to know where the pitfalls are.

Thanks! 
Rob


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create Web Applications With ColdFusion MX7 & Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:281171
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