I feel what i will be working for is good candidate for MVC Design Pattern.
However I am held up with my "Model" and ways to update the "View" decision.
(I refered to other posts related to MVC and found out that "Model" design is something always interesting and bit difficult/confusing to start with).
Heres what the application does:
Its a "Multi-level" UI based application (ie one UI Screen for getting data from Producer for populating the screen and other UI for configuring the Producer state etc. Please read on for more info on "Producer").
I have no problem with "View" and "Controller" part since Swings implements the MVC Patterns itself.
However here is my "real hang":
User modifies an UI Element (lets say check box is clicked), "Controller" picks up the change in state and this info is passed on to "Producer" which is another system over ethernet link. The "Producer" replies back and based on reply the UI Element state is changed (ie to keep the checkbox selected or not, update JLabel content etc).
Refer attachement for Pictorial Representation (I truly belive "Picture speaks thousand words" ;-) )
The UI Application has no state of itself and everything depends on what is received from the "Producer".
Dreaded (atleast for me) question: Based on the attached picture "Worker" becomes my "Model" of MVC. However, what would be best way of updating the "View" whenever "Producer" Posts a change in state to the Application or User does a change and this change needs to be updated on view(based on reply from "Producer").
I guess what i am looking for is a good way to inform my "View" from my "Model" that you need update your view state.
I personally feel it would not be a good to have a reference of all the UI Frames in "Worker" and update accordingly.
Please let meknow in if my doubt isnt clear, i have tried my best to put forward in good way.