How specific does the Single Responsibility pattern should be?
For example, suppose you have a console game program, which has all kinds of input/output methods to and from the console, would it be smart to keep them all in a single inputOutput
class or break them down to more specific classes like startMenuIO
, inGameIO
, playerIO
, gameBoardIO
, etc such that each class has about 1-5 methods?
And on the same note, if it's better to break them down, would it be smart to place them in a IO
namespace thus making calling them a little more verbose, i.e: IO.inGame
etc?
Aucun commentaire:
Enregistrer un commentaire