this is not an error or code going wrong but a simple question: how do you design your layout(how many classes you are going to use, which constructors,...
I am now on a project:reading an xml file, parsing it and start downloading (Explained simple) Is there a trick to know how many classes,... you are going to use?
short answer, no trick.
with having to solve problems comes the experience that allows one to expect about how many components will be in the final system, but depending on what design paradigm you follow (top down, UML, so many really), and even the level of detail used in these, the total inventory won't become apparent until the the design, and possibly the implementation has been completed.
and for agile projects where the scope of the problem to be solved is always moving, you never are really 'done' anyway.
IMO... forget trying to define your scope at the start, use the most agile approach as you possibly can. Only define what you need too when you need too and be ready to be ruthless with your refactoring.
Even long term coders find themselves reworking/ refactoring their code. Misconceptions and misinterpretations are a fact of life.
Use as many classes as feels good, don't over engineer, if an object seems to be getting a bit clunking (doing too many things), get out the refactor stick and start belting it till another object falls out.
Ultimately it really doesn't matter how many objects you use, whats more important is that when you come back to the code a year from now its obvious where you were going with it and what the intent was.
If a method or class requires more than a 2 or 3 line comment to explain it .... get out the refactor stick again !!
thanks for the response guys.
I have a long method, it takes my hole screen and It has some loops in it.
should I split or is this still considered as clean?