I am coding a GUI that communicates via TCP/IP with Automated Guided Vehicles (AGVs).
The Model communicates with TCP/IP Service layer.
I was thinking of letting the Presenter subscribe to the TCP/IP events?
But is this the best solution?
After receiving the events the View should be updated.
Any suggestions are appreciated.
Jul 19, 2010
Joshua, thanks for your answer :-)
I think my problem is that I have 2 Presenters.
I want both Presenters to subscribe to the TCP/IP events.
The instance of TCP/IP Service layer is created in the Model.
Do I have to pass the functions that should be called in the 2 Presenters to the Model?
Or maybe I should create the TCP/IP Service layer in the base class for all Presenter classes
and then pass it to the Model?
Jul 21, 2010
My solution for the time being:
The Model creates an instance of TCP/IP Service and calls the TCP/IP Service layer.
The different Presenters subscribes to relevant TCP/IP events and updates the View.
To avoid passing of functions (or other problems) I have implemented the TCP/IP Service as a Singleton.
I anyone knows of good examples/articles on how to handle events from a non Microsoft service layer in MVP,
please post a link here.