A few months ago, I attended a presentation organized by two representatives of an independent software development company. It was mainly about good software design and practice.
Two guys talked mostly about Java, and I remember how they said that in some cases it is very useful to use getInstanceOf () instead of the constructor. This is somehow connected with the fact that getInstanceOf () always called from different classes, and not from the constructor, and as it was much better for larger-scale projects.
As you can see, I cannot remember much about it now: / but I remember that the arguments they used were really convincing. I wonder if any of you have ever come across such a design, and when, will you say, is it useful? Or do you think that this is not so at all?
Artur source
share