Monday, November 21, 2011

Stateful objects must really need to be stateful.

While I'm thinking about it, another thing which Joel mentioned that I could have done better here is that I could have had my helper return the end data instead of having it wearing the end data within getsetters. Joel asserts that a helper should not be stateful, it should be static. A class such as the one I made is a model and not a helper. I should err on the side of making any one object, regardless of the situation, static if possible. Stateful objects must really need to be stateful.

No comments:

Post a Comment