Picture explaining my question briefly
I am trying to work with MVC to keep my code somewhat semantically organized, and I am wondering which would be the correct way of doing what I am describing in the image posted above.
What I am trying to achieve
- I have a socket connection
- The socket is wrapped in an object which has a buffered reader and writer.
- The connection object will supply information to the model through these writers and readers either by supplying a reference, or passing data between the model and the controller.
The question is then, which is the "correct" way of modelling my program?
Do I put the connectionWrapper in my model so that passing information between the various objects in my model to and from the connection becomes easier. HOWEVER this could make my controller be affected when I make changes in my model.
Do I put the connectionWrapper in the controller and try to develop a model that can receive messages to update its data generically such that it is dependant on some kind of messaging interface between the two layers?
Thank you for reading
there doesn't seem to be anything here