posted 12 years ago
I have a object and I am not sure to place a (long) method within this object to set some properties which only belongs to this object-instance.
What if I retrieve (for example, 100000) object-instances.
Would it be not better,
to place this (long) method out of that object-instance in a separate class
(for example, a business-class) and invoke it from that class?
In this case,
I only have one method which sets the properties of a instance instead of 100000 methods,
where each instance has this method in it.
However, when doing this, it disturbs my object-encapsulation.
What should I do?