Re: Is this good use of Properties?
- From: Jon Skeet [C# MVP] <skeet@xxxxxxxxx>
- Date: Sat, 14 May 2005 06:29:17 +0100
Bill Butler <qwerty@xxxxxxxx> wrote:
>
> "Rick Elbers" <rick.elbers@xxxxxxxxx> wrote in message
> news:j08a81ti69dkulp755m4ksbelh3mr8knvd@xxxxxxxxxx
>
> I hunted around a bit and came up with this:
> "Why getter and setter methods are evil " by Alan Holub
> http://www.javaworld.com/javaworld/jw-09-2003/jw-0905-toolbox.html
> pay close attention to the forum that follows the article.
> (He does not get unanimous acceptance)
<snip>
Ah yes - I seem to remember seeing it before and disagreeing with it
then. The idea that a class should be able to draw itself just in case
it's needed in a UI seems ridiculous to me - which UI should be picked,
for instance? SWT? Swing? AWT? All three? What about a web UI? What
happened to separating presentation logic from business logic? How can
the author of a business class know all the different ways in which it
may need to be drawn?
It puts the onus on a class to know all the ways in which it might be
used, rather than providing something which can be used in a variety of
situations. I can see it working in some situations, but overall I'm
not a fan.
--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
.
- Follow-Ups:
- Re: Is this good use of Properties?
- From: Rick Elbers
- Re: Is this good use of Properties?
- References:
- Re: Is this good use of Properties?
- From: Rick Elbers
- Re: Is this good use of Properties?
- From: Rick Elbers
- Re: Is this good use of Properties?
- From: Jon Skeet [C# MVP]
- Re: Is this good use of Properties?
- From: Rick Elbers
- Re: Is this good use of Properties?
- From: Jon Skeet [C# MVP]
- Re: Is this good use of Properties?
- From: Rick Elbers
- Re: Is this good use of Properties?
- From: Jon Skeet [C# MVP]
- Re: Is this good use of Properties?
- From: Rick Elbers
- Re: Is this good use of Properties?
- From: Jon Skeet [C# MVP]
- Re: Is this good use of Properties?
- From: Rick Elbers
- Re: Is this good use of Properties?
- From: Bill Butler
- Re: Is this good use of Properties?
- Prev by Date: Re: Is this good use of Properties?
- Next by Date: Re: Dialog boxes and how to get the DialogResult return value
- Previous by thread: Re: Is this good use of Properties?
- Next by thread: Re: Is this good use of Properties?
- Index(es):
Relevant Pages
|