I have divided my project into three packages: model, controller, view. But I am still confused where to put the classes which deal with I/O communication in my application – in my case the I/O communication is done by network sockets reading incoming messages which have an effect to the model.
I’ve been told three things now:
- it belongs to the controller, since it deals with transferring the data
- it belongs to the model, since every aspect of the domain model should be part of the model
- none if it, put it in a separate package or the default package
Currently I am going with the third advice, however I am still thinking it might be the second point. Could someone clarify what is meant in this context?
Usually there’s a service package that is services the controller makes use of. It would fit nicely there.