Is JavaBean only with getter and setter methods A evil?

From: Savagearts (Savagearts_at_msn.com)
Date: 12/30/03


Date: 29 Dec 2003 23:39:11 -0800

I've worked for some j2ee prjects and often find lots of objects only
with getter and setter methods. I'm confused. I think that this style
object is the same to C Style Struct Object.This style object disclose
all details of the object. But sometime this style object may be
useful. for example: we may get data from DAO Object: we put all data
from DB and let this style object to hold data and return to our
business layer. can Anyone give me some ideas about this style object?
thx.



Relevant Pages

  • Re: thread sync
    ... > Can anyone shead any light on why the following throws up an exception ... > I cannot put synchroize around the property changes, ... getter and setter methods and/or fields. ...
    (alt.comp.lang.borland-delphi)
  • Re: Is this good use of Properties?
    ... > "Why getter and setter methods are evil " by Alan Holub ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: What is a property?
    ... > It is also possible via getter and setter methods. ... What exact benefit does ... >> not possible to give read-only or write only access to public fields. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How to re-use existing classes in JSP/JavaBeans/Servlets
    ... >> Written by Allen Holub, it about the pitfalls of abusing getter and ... > Getter and setter methods are dangerous ... assuming my definition of accessor. ...
    (comp.lang.java.programmer)