Re: Consolidating java objects
On 17.10.2006 14:40, Dave wrote:
It seems you are on a good track though. Circumstances are certainly
less than ideal but since you enjoying it...
I never bothered with getters and setters that didn't have logic either
in my previous projects. I knew a heavily OO guy whose code was pure
OO. I remember him having lines like this:
I would not consider that "pure OO". That's plain nonsense. You can
achieve the same level of encryption by nesting function calls that deep
in other languages.
The number of objects may not be a problem, but part of Java is the
idea of re-use.
I would even go as far as to say reuse is a major goal whatever language
you use. OO languages are generally considered to be better suited to
facilitating reuse, but you can do that in all languages.
When I see the exact same 10 fields over and over in
dozens of objects, that looks to me like there should have been a
single class with those 10 fields, and all of the others should have
inherited from that class.
.... or used that as a member (delegation).
> And considering that back in January there
were only around 30-40 classes (from the current project architect) and
that now we have 240 more just 9 months later looks to me like out of
control object creation, especially when so many are so similar in
I'd like to make two requests: please stop using the word "object" when
in fact you mean "class". This is bound to cause confusion. We have
some terms with pretty clear meaning in CS and it helps communication
greatly if everybody sticks to them.
And please do not top post. :-)