On 4/18/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> PMFJI.  Returning a structure in this example is no less encapsulated
> than returning individual field values, depending on how the methods
> are written.  If you want a structure, just write a getter for the
> structure.

But to avoid client code messing with the object's state, return it
after duplicate()ing it.

Of course, there are no black and white rules here so if you have 40
form fields, there's not much value in writing 40 getters and 40
setters since your views are going to be very tightly bound to your
data model and your form processing... :)
-- 
Sean A Corfield -- http://corfield.org/
Team Fusebox -- http://fusebox.org/
Got Gmail? -- I have 50, yes 50, invites to give away!

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:12:6749
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/12
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:12
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.12
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to