Re: deprecated API
Re: deprecated API
- Subject: Re: deprecated API
- From: Chuck Hill <email@hidden>
- Date: Thu, 9 Feb 2006 15:01:25 -0800
Hi Art,
On Feb 9, 2006, at 2:44 PM, Art Isbell wrote:
On Feb 9, 2006, at 12:33 PM, Jerry W. Walker wrote:
Like Chuck, I tend to use straight assignment for many of the same
reasons. However, in this example I just didn't want to make
arbitrary decisions on whether the members whose values I was
setting were iVars or methods.
Does it bother anyone else that WOBuilder generates protected
rather than private ivars so that WO can access these ivars
directly rather than using accessor methods? Seems like a bad
practice to me.
Are they protected or public? I thought there were public in recent
versions. But, yeah, it bothers me sometimes.
Instead, I make all my ivars private forcing WO to access them via
accessor methods unless there's a good reason to make these ivars
accessible to subclasses (but then they should probably use
accessor methods also).
I'm not too overly strict in this area. If it is a binding (say item
in a repetition) that I will never access in code, then I don't see
the harm in making it public. Also, if it is a page (rather than a
component that might get reused), I am a little less paranoid about
public ivars that I don't (much) use in code. For anything that
might get subclassed and reused, or which is used in code, I make the
ivar private and add accessor methods.
Chuck
--
Coming in 2006 - an introduction to web applications using WebObjects
and Xcode http://www.global-village.net/wointro
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems. http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden