On Mon, Jun 16, 2008 at 4:15 PM, Matthijs Wensveen <[EMAIL PROTECTED]> wrote: > I disagree that you expose internal state. It's hardly internal when there > is a public setter.
You are contradicting yourself: the sole purpose of a public setter is to expose internal state. Therefore setters are evil. In the very least it allows for confusing semantics when overrides are allowed. A setter is nice for a data object, but that is it. IMO setting the any property outside the owning object breaks the encapsulation of the object, but I'm pragmatic enough to consider setting visible to false when I feel like it :) Setters push people into an interaction driven design, where testing is made considerably difficult, because the internal state is made public. I'd love to create objects where I modify the state through actions on the objects, but frameworks such as hibernate and others 'force' me into providing getters and setters. It also takes somewhat longer to get the object model right when trying to not use setters/getters. Martijn > But I agree that it is often very useful to override the > getter (isser for booleans?) when there is a hard dependency between the > component visibility and some other state. As I said: it's good to have > choice. >> >> Martijn >> >> > > > -- > Matthijs Wensveen > Func. Internet Integration > W http://www.func.nl > T +31 20 4230000 > F +31 20 4223500 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.3 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]