Saturday, November 04, 2006

java thought

I like conceptual what they are suggesting in this article.


steve said...

Whenever I talk to you about your SetterEradicator tendencies, I get pretty sucked into the idea. But I must admit there is something that holds me back from committing to it.

Would it be fair to say that an object that has no behavior is just a bad code smell that we want to avoid?

James said...

Yes... but what about those DTO objects, or value objects, "dataglob" types of objects, this article makes me feel better about having setters in those cases. Having setters seems okay in this case, as the only alternative with big sets of data seems to be really long constructors args.